<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml"
      xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>应收台账</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
          name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--插件样式-->
    <link href="/dist/plugins/ztree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/dist/plugins/webuploader-0.1.5/webuploader.css">
    <!--OA主样式-->
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=f5a12a1d">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=16f1e6f3">
    <style>
        .model-picker-input {
            opacity: 0 !important;
            top: -9999px;
            left: -9999px;
            position: absolute;
        }

        .model-picker-span {
            position: relative;
            display: block;
            outline: 0;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            border-bottom: 1px solid #ccc;
            background-color: #fff;
            color: #ccc;
            cursor: pointer;
        }

        .model-picker-span > .placeholder {
            color: #aaa;
        }

        .jieQ td {
            color: #2a8cec !important;
            /*color: red !important;*/
        }

        .benYwJieQ td.yellow {
            color: #fff !important;
            background-color: red;
        }

        .yellow {
            color: #fff !important;
            background-color: red;
        }

        .model-picker-span > .arrow {
            position: absolute;
            top: 50%;
            right: 8px;
            width: 10px;
            margin-top: -3px;
            height: 5px;
            background: url(../images/drop-arrow.png) -10px -25px no-repeat;
        }

        .model-picker-span.focus,
        .model-picker-span.open {
            border-bottom-color: #46A4FF;
        }

        .model-picker-span.open > .arrow {
            background-position: -10px -10px;
        }

        .model-picker-span > .title > span {
            color: #333;
            padding: 5px;
            border-radius: 3px;
        }

        .model-picker-span > .title > span:hover {
            background-color: #f1f8ff;
        }

        .model-picker-dropdown {
            position: absolute;
            width: 315px;
            left: -9999px;
            top: -9999px;
            outline: 0;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            z-index: 999999;
            display: none;
            min-width: 200px;
            margin-bottom: 20px;
            margin-top: 5px;
        }

        .model-select-wrap {
            box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
        }

        .model-select-tab {
            border-bottom: 1px solid #ccc;
            background: #f5f5f5;
            /*font-size: 13px;*/
        }

        .model-select-tab > a {
            display: inline-block;
            padding: 4px 20px;
            border-left: 1px solid #ccc;
            border-bottom: 1px solid transparent;
            color: #4D4D4D;
            text-align: center;
            outline: 0;
            text-decoration: none;
            cursor: pointer;
            /*font-size: 14px;*/
            margin-bottom: -1px;
        }

        .model-select-tab > a.active {
            background: #fff;
            border-bottom: 1px solid #fff;
            color: #46A4FF;
        }

        .model-select-tab > a:first-child {
            border-left: none;
        }

        .model-select-tab > a:last-child.active {
            border-right: 1px solid #ccc;
        }

        .model-select-content {
            width: 100%;
            min-height: 50px;
            background-color: #fff;
            padding: 5px 5px;
        }

        .model-select {
            /*font-size: 16px;*/
        }

        .model-select dl {
            line-height: 2;
            clear: both;
            padding: 3px 0;
            margin: 0;
            max-height: 200px;
            overflow-y: scroll;
        }

        .model-select dt {
            position: absolute;
            width: 2.5em;
            font-weight: 500;
            text-align: right;
            line-height: 2;
        }

        .model-select dd {
            margin-left: 0;
            line-height: 2;
        }

        .model-select.province dd {
            margin-left: 3em;
        }

        .model-select a {
            display: inline-block;
            padding: 0 10px;
            outline: 0;
            text-decoration: none;
            white-space: nowrap;
            margin-right: 2px;
            color: #333;
            cursor: pointer;
        }

        .model-select a:hover,
        .model-select a:focus {
            background-color: #f1f8ff;
            border-radius: 2px;
            color: #46A4FF;
        }

        .model-select a.active {
            background-color: #46A4FF;
            color: #fff;
            border-radius: 2px;
        }

        .table-detail input[type=text] {
            padding-left: 0;
        }

        td {
            color: #2a8cec;
        }

        td.td-title {
            color: #333;
        }

        select {
            color: rgb(42, 140, 236) !important;
            background: #fff;
        }

        .table-detail td {
            /*font-size: 16px;*/
            /*line-height: 35px;*/
            height: 29px;
            border-right: 1px solid #cbcbcb;
            border-bottom: 1px solid #cbcbcb;
            border-top: 1px solid #cbcbcb;
        }

        .table-detail td.td-title {
            line-height: 1.5;
            background: #fff;
        }

        .table-detail td.td-row3 {
            height: 75px;
            line-height: 20px;
            max-height: 75px;
            overflow: hidden;
            position: relative;
        }

        .yuying {
            position: absolute;
            right: 10px;
            bottom: 10px;
            width: 20px;
            height: 20px;
            background: url("/dist/img/yuyin.png");
            background-size: cover;
            cursor: pointer;
        }

        input {
            text-align: left !important;
        }

        .table-detail td.td-value {
            text-align: left !important;
            padding-left: 4px !important;
            /*font-size: 16px !important;*/
        }

        .btn-group-xs > .btn, .btn-xs {
            padding: 1px 5px;
            /*font-size: 16px;*/
            line-height: 1.5;
            border-radius: 3px;
        }

        .table-detail textarea {
            height: 29px;
            width: 100%;
            border: none;
            outline: none;
            -webkit-appearance: none;
            resize: none;
            line-height: 20px;
            padding-top: 6px !important;
            padding-left: 6px;
        }

        .td-row3 span {
            max-height: 60px;
            line-height: 20px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 3;
            text-align: left;

        }

        .div-td-content-more {
            position: absolute;
            height: auto;
            z-index: 999;
            line-height: 20px;
            background-color: #d3e8fd;
            padding: 8px 6px;
            border: 1px solid #e8e8ea;
            display: none;
        }

        .div-td-content-more i {
            width: 15px;
            height: 12px;
            background: url("/dist/img/more-icon.png");
            position: absolute;
            left: 50px;
            top: -12px;
        }

        .table-detail {
            border-left: 1px solid #cbcbcb;
            border-top: 1px solid #cbcbcb;
        }

        span.lineOne {
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1;
        }

        .table-detail td.td-tanZongStyle-line {
            padding: 1px !important;
            text-align: left !important;

        }

        .td-tanZongStyle-line input {
            box-shadow: inset 1px 1px 4px #333;
            height: 100% !important;
            padding-left: 4px !important;
        }

        .td-tanZongStyle-line textarea {
            box-shadow: inset 1px 1px 4px #333;
            display: block;
        }

        .td-tanZongStyle-line span {
            padding-left: 4px !important;
        }

        .table-detail td.td-tanZongStyle-line {
            height: 100% !important;
            padding: 1px !important;

        }

        .td-tanZongStyle-line input {
            height: 28px !important;
            box-shadow: inset 1px 1px 4px #333;
            padding-left: 4px !important;
        }

        .td-tanZongStyle-line textarea {
            box-shadow: inset 1px 1px 4px #333;
            display: block;
        }

        .td-tanZongStyle-line span {
            padding-left: 4px !important;
        }

        .td-tanZongStyle-line select {
            box-shadow: inset 1px 1px 4px #333;
            height: 35px !important;
            padding-left: 4px !important;
        }

        .span-a-btn {
            position: absolute;
            right: 10px;

        }

        .white a {
            color: #2a8cec;
        }

        .jieQ td {
            color: #2a8cec !important;
            /*color: red !important;*/
        }

        .benYwJieQ td {
            /*color: red !important;*/
            color: #2a8cec !important;
        }

        .wJieQ td {
            color: #2a8cec !important;
            /*color: red !important;*/
        }

        .IcoNormal {
            float: left;
            border-bottom: 0px;
            border-left: 0px;
            background-color: transparent;
            width: 16px;
            height: 16px;
            vertical-align: middle;
            border-top: 0px;
            border-right: 0px;
            background-image: url(/dist/img/upload_normal.gif);
            background-repeat: no-repeat;
            float: left;
            margin-top: 4px;
            margin-right: 5px;
            margin-left: 5px;
        }

        .progressobj {
            height: 20px;
        }

        .progressobj .delfile {
            float: left;
            margin-left: 10px;
        }

        table td.td-tanZongStyle-line span, table td.td-tanZongStyle-line > div {
            display: block;
            /*max-height: 24px;*/
            line-height: 29px;
            overflow: hidden;
        }

        .lineOne span, .lineSpan {
            max-height: 20px;
            line-height: 20px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1;
            padding-right: 10px;
        }

        .webuploader-pick {
            background: url(/dist/img/fjT1.png) no-repeat 5px center;
            padding: 0 4px;
            height: 29px;
            line-height: 29px;
            padding-left: 15px;
            margin: 0 auto;
            width: 45px;
            /* margin-top: 9px; */
            border-radius: 4px;
            display: block;
        }

        .webuploader-pick-hover {
            color: #fff !important;
            background: url(/dist/img/fjT2.png) no-repeat 5px center;
            background-color: #0F6099;

        }

        .daoru .webuploader-pick-hover {
            color: #2a8cec !important;
        }

        .daoru .webuploader-pick {
            color: #2a8cec;
            background: none;
            margin-right: 5px;
            margin-top: -5px;
            width: 134px;
        }

        .benYwJieQ td.bH {
            color: red !important;
        }
    </style>
</head>
<body id="sxbody">
<iframe id="ifAttach" style="display:none"></iframe>
<section class="content" id="app" v-cloak>
    <div class="oaLoad">
        <div class="loadGif" id="areaProgress"></div>
    </div>
    <div class="div-td-content-more"><i></i></div>
    <div style="height: 50px;z-index: 999;position: fixed;background-color: white;top: 0px;width: 100% ;left: 0;padding: 0 20px;">
        <table id="wait" class="table-detail"
               style="border: none; margin:0 auto;margin-top: 10px;z-index: 999;background: #fff;border: none">
            <tr>
            <td class="td-title"
                style="text-align: right;font-size: 21px;font-weight: bold;padding-left: 5px !important;border: none;position: absolute;left: 50%;margin-left: -139px;z-index: 111;">
                可用余额(元)：
            </td>
            <td style="text-align: left;font-size: 21px;font-weight: bold;width: 207px;border: none;position: absolute;left: 50%;margin-left: 7px;z-index: 99;">
                <span style="color: red; margin-left: 5px; border: 1px solid rgb(205, 205, 205); padding: 4px; display: block; width: 160px; float: left;">{{fmoney(canUseMoney)!='-'?fmoney(canUseMoney):'0.00'}}</span>
                <!--<span style="color: black;vertical-align: middle;margin-left: 5px;">元</span>-->
            </td>
                <td class="td-title" v-if="buyType=='融资租赁'"
                    style="text-align: right;font-size: 15px;font-weight: bold;padding-left: 5px !important;border: none">
                    保证金(元)：
                </td>
                <td style="text-align: left;font-size: 15px;font-weight: bold;width: 207px;border: none" v-if="buyType=='融资租赁'">
                    <span style="color: red;margin-left: 5px;padding: 4px;display: block;width: 160px;float: left;">{{fmoney(bond)!='-'?fmoney(bond):'0.00'}}</span>
                </td>
        </tr>


        </table>
    </div>
    <div class="center" style="overflow:auto;overflow-x:hidden;margin-top: 25px;">
        <!--******************************************* 首付款欠款 ******************************************************-->
        <template>
            <table class="table-detail" style="margin-top: 30px;">
                <tr>
                    <td colspan="13" class="td-module">
                        首付款欠款
                    </td>
                </tr>
            </table>
            <table class="table-detail">
                <tr>
                    <td class="td-title" style="width: 35px">选择<br>还款</td>
                    <td class="td-title" style="width: 75px">销售合同<br>还款日期</td>
                    <td class="td-title" style="width: 75px">约定还款金额<br>(元)</td>
                    <td class="td-title" style="width: 75px">约定利息<br>(元)</td>
                    <td class="td-title" style="width: 75px">实际还款<br>日期</td>
                    <td class="td-title" style="width: 75px">还款金额<br>(元)</td>
                    <td class="td-title" style="width: 75px">剩余欠款<br>(元)</td>
                    <td class="td-title" style="width: 75px">还款<br>(元)</td>
                    <td class="td-title" style="width: 75px">逾期罚息<br>(元)</td>
                    <td class="td-title" style="width: 75px">免除金额<br>(元)</td>
                    <td class="td-title" style="width: 75px">还款<br>(元)</td>
                    <td class="td-title" style="width: 75px">还款日期</td>
                    <!--<td class="td-title" style="width: 75px">实收罚息<br>(元)</td>-->
                    <!--<td class="td-title" style="width: 114px">上传凭证</td>-->
                    <!--<td class="td-title" style="width: 60px">录入人</td>-->
                    <td class="td-title">备注</td>
                    <td class="td-title" style="width: 90px">操作</td>
                </tr>
                <template v-for="(item,i) in contract.repaySFMent">
                    <tr class="benYwJieQ">
                        <td :rowspan="item.repaymentParentList.length+1"><input type="checkbox" @click="checked(item)"
                                                                                :checked="item.isCheck"
                                                                                v-if="item.overduePenalty>0||item.remainingArrears>0||compareFiveDate(item.repaymentDate)>=0"/>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :rowspan="item.repaymentParentList.length+1">
                            <span v-if="compareFiveDate(item.repaymentDate)>0" style="">{{item.repaymentDate}}</span>
                            <span v-else
                                  :class="changeRed('repaySFMent',i)?'jieQ':'yellow'">{{item.repaymentDate}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :rowspan="item.repaymentParentList.length+1">
                            <span v-if="compareFiveDate(item.repaymentDate)>0" style="">{{fmoney(item.total)}}</span>

                            <span v-else
                                  :class="changeRed('repaySFMent',i)?'jieQ':'yellow'">{{fmoney(item.total)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :rowspan="item.repaymentParentList.length+1">
                            <span v-if="compareFiveDate(item.repaymentDate)>0" style="">{{fmoney(item.interest)}}</span>

                            <span v-else
                                  :class="changeRed('repaySFMent',i)?'jieQ':'yellow'">{{fmoney(item.interest)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">
                            <span v-if="compareFiveDate(item.repaymentDate)>0"
                                  style="">{{item.actualRepaymentDate}}</span>

                            <span v-else>{{item.actualRepaymentDate}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">
                            <template v-if="item.hkType!='3'">
                                <span v-if="item.repaymentAmount=='0.00'&&compareDate(item.repaymentDate,getNowDate())"
                                      style="">未到期</span>

                                <span v-else>{{fmoney(item.repaymentAmount)}}</span>
                            </template>
                            <template v-else>
                                <span>-</span>
                            </template>
                        </td>

                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'qianKuan')?'bH':''">
                            <span v-if="compareFiveDate(item.repaymentDate)>0">-</span>
                            <span v-else>{{fmoney(item.everyRemainingArrear)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                        >
                            <input type="text"
                                   v-if="((item.isCheck&&item.sumqkmoney!=0)||(item.isCheck&&item.repaymentAmount=='0.00')||(item.isCheck&&compareFiveDate(item.repaymentDate)>=0))&&item.hk=='1'"
                                   @blur="strFormat($event.target,'contract.repaySFMent.'+i+'.qkRepayment'),repayMentMoney('repaySFMent',i,'0'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repaySFMent.'+i+'.qkRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repaySFMent.'+i+'.qkRepayment'),strFormat($event.target,'contract.repaySFMent.'+i+'.qkRepayment')"
                                   v-onedate="fmoney(item.qkRepayment)"
                                   style="text-align: center !important;">
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'faXi')?'bH':''">
                            <span>{{fmoney(item.everyOverduePenalty)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'faXi')?'bH':''">
                            <span class="lineOne" style="padding-left: 0px !important;" v-if="item.hkType=='3'">{{fmoney(item.repaymentAmount)}}</span>
                            <span v-else>-</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                        >
                            <input v-if="item.isCheck&&item.sumyqmoney!=0&&item.hk=='1'"
                                   type="text"
                                   @blur="strFormat($event.target,'contract.repaySFMent.'+i+'.yqRepayment'),repayMentMoney('repaySFMent',i,'1'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repaySFMent.'+i+'.yqRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repaySFMent.'+i+'.yqRepayment'),strFormat($event.target,'contract.repaySFMent.'+i+'.yqRepayment')"
                                   v-onedate="fmoney(item.yqRepayment)" style="text-align: center !important;"/>
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                        >
                            <input v-if="item.isCheck&&item.hk=='1'"
                                   type="text"
                                   v-model="item.repaymentDate2" placeholder="选择日期"
                                   @focus="showDatePicker($event,item,'repaymentDate')"
                                   style="text-align: center !important;    padding-left: 0 !important;text-indent: 0px;"/>
                            <span v-else>{{item.repaymentDate2}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">


                            <textarea v-if="item.isCheck&&item.hk=='1'" v-model="item.remark2"
                                      class="divMore"></textarea>
                            <span v-else>{{item.remark2}}</span>
                        </td>
                        <td style="vertical-align: bottom">
                            <template v-if="item.hk=='1'">
                                <input type="button" value="保存" class="btn oaBtn btn-sm" v-if="item.isCheck"
                                       @click="save(item.qkRepayment,item.yqRepayment)" style="margin-top: -6px;">
                                <input type="button" value="保存" class="btn oaBtn btn-sm"
                                       style="background: #ddd !important;cursor: no-drop;margin-top: -6px" v-else>
                            </template>
                            <template v-else>
                                <span></span>
                            </template>

                        </td>
                    </tr>
                    <tr v-for="(item2,i2) in item.repaymentParentList" class="benYwJieQ">

                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2)?'bH':''">
                            <span>{{item2.actualRepaymentDate}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2)?'bH':''">
                            <template v-if="item2.hkType!='3'">
                                <span v-if="item.repaymentAmount=='0.00'&&compareDate(item.repaymentDate,getNowDate())"
                                      style="">未到期</span>

                                <span v-else>{{fmoney(item2.repaymentAmount)}}</span>
                            </template>
                            <template v-else>
                                <span>-</span>
                            </template>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2,'qianKuan')?'bH':''">
                            <span>{{fmoney(item2.everyRemainingArrear)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                        >
                            <input type="text"
                                   v-if="((item.isCheck&&item.sumqkmoney!=0)||(item.isCheck&&item.repaymentAmount=='0.00')||(item.isCheck&&compareFiveDate(item.repaymentDate)>=0))&&item2.hk=='1'"
                                   @blur="strFormat($event.target,'contract.repaySFMent.'+i+'.qkRepayment'),repayMentMoney('repaySFMent',i,'0'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repaySFMent.'+i+'.qkRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repaySFMent.'+i+'.qkRepayment'),strFormat($event.target,'contract.repaySFMent.'+i+'.qkRepayment')"
                                   v-onedate="fmoney(item.qkRepayment)"
                                   style="text-align: center !important;">
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2,'faXi')?'bH':''">
                            <span>{{fmoney(item2.everyOverduePenalty)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'faXi')?'bH':''">
                            <span class="lineOne" style="padding-left: 0px !important;" v-if="item2.hkType=='3'">{{fmoney(item2.repaymentAmount)}}</span>
                            <span v-else>-</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                        >
                            <input v-if="item.isCheck&&item.sumyqmoney!=0&&item2.hk=='1'"
                                   type="text"
                                   @blur="strFormat($event.target,'contract.repaySFMent.'+i+'.yqRepayment'),repayMentMoney('repaySFMent',i,'1'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repaySFMent.'+i+'.yqRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repaySFMent.'+i+'.yqRepayment'),strFormat($event.target,'contract.repaySFMent.'+i+'.yqRepayment')"
                                   v-onedate="fmoney(item.yqRepayment)" style="text-align: center !important;"/>
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                        >
                            <input v-if="item.isCheck&&item2.hk=='1'"
                                   type="text"
                                   v-model="item.repaymentDate2" placeholder="选择日期"
                                   @focus="showDatePicker($event,item,'repaymentDate')"
                                   style="text-align: center !important;    padding-left: 0 !important;text-indent: 0px;"/>
                            <span v-else>{{item.repaymentDate2}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">


                            <textarea v-if="item.isCheck&&item2.hk=='1'" v-model="item.remark2"
                                      class="divMore"></textarea>
                            <span v-else>{{item.remark2}}</span>
                        </td>
                        <td style="vertical-align: bottom">
                            <template v-if="item2.hk=='1'">
                                <input type="button" value="保存" class="btn oaBtn btn-sm" v-if="item.isCheck"
                                       @click="save(item.qkRepayment,item.yqRepayment)" style="margin-top: -6px;">
                                <input type="button" value="保存" class="btn oaBtn btn-sm"
                                       style="background: #ddd !important;cursor: no-drop;margin-top: -6px" v-else>
                            </template>
                            <template v-else>
                                <span></span>
                            </template>
                        </td>
                    </tr>
                </template>
                <template v-for="(item,i) in contract.repayDKMent">

                    <tr class="benYwJieQ">
                        <td :rowspan="item.repaymentParentList.length+1"><input type="checkbox" @click="checked(item)"
                                                                                :checked="item.isCheck"
                                                                                v-if="item.overduePenalty>0||item.remainingArrears>0||compareFiveDate(item.repaymentDate)>=0"/>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :rowspan="item.repaymentParentList.length+1">
                            <span v-if="compareFiveDate(item.repaymentDate)>0" style="">{{item.repaymentDate}}</span>

                            <span v-else
                                  :class="changeRed('repayDKMent',i)?'jieQ':'yellow'">{{item.repaymentDate}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :rowspan="item.repaymentParentList.length+1">
                            <span v-if="compareFiveDate(item.repaymentDate)>0" style="">{{fmoney(item.total)}}</span>

                            <span v-else
                                  :class="changeRed('repayDKMent',i)?'jieQ':'yellow'">{{fmoney(item.total)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :rowspan="item.repaymentParentList.length+1">
                            <span v-if="compareFiveDate(item.repaymentDate)>0" style="">{{fmoney(item.interest)}}</span>

                            <span v-else
                                  :class="changeRed('repayDKMent',i)?'jieQ':'yellow'">{{fmoney(item.interest)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">
                            <span v-if="compareFiveDate(item.repaymentDate)>0"
                                  style="">{{item.actualRepaymentDate}}</span>

                            <span v-else>{{item.actualRepaymentDate}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">
                            <template v-if="item.hkType!='3'">
                                <span v-if="item.repaymentAmount=='0.00'&&compareDate(item.repaymentDate,getNowDate())"
                                      style="">未到期</span>

                                <span v-else>{{fmoney(item.repaymentAmount)}}</span>
                            </template>
                            <template v-else>
                                <span>-</span>
                            </template>

                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'qianKuan')?'bH':''">
                            <span v-if="compareFiveDate(item.repaymentDate)>0">-</span>
                            <span v-else>{{fmoney(item.everyRemainingArrear)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input type="text"
                                   v-if="((item.isCheck&&item.sumqkmoney!=0)||(item.isCheck&&item.repaymentAmount=='0.00')||(item.isCheck&&compareFiveDate(item.repaymentDate)>=0))&&item.hk=='1'"
                                   @blur="strFormat($event.target,'contract.repayDKMent.'+i+'.qkRepayment'),repayMentMoney('repayDKMent',i,'0'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayDKMent.'+i+'.qkRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayDKMent.'+i+'.qkRepayment'),strFormat($event.target,'contract.repayDKMent.'+i+'.qkRepayment')"
                                   v-onedate="fmoney(item.qkRepayment)"
                                   style="text-align: center !important;"/>
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'faXi')?'bH':''">
                            <span>{{fmoney(item.everyOverduePenalty)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'faXi')?'bH':''">
                            <span class="lineOne" style="padding-left: 0px !important;" v-if="item.hkType=='3'">{{fmoney(item.repaymentAmount)}}</span>
                            <span v-else>-</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item.sumyqmoney!=0&&item.hk=='1'"
                                   type="text"
                                   @blur="strFormat($event.target,'contract.repayDKMent.'+i+'.yqRepayment'),repayMentMoney('repayDKMent',i,'1'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayDKMent.'+i+'.yqRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayDKMent.'+i+'.yqRepayment'),strFormat($event.target,'contract.repayDKMent.'+i+'.yqRepayment')"
                                   v-onedate="fmoney(item.yqRepayment)"
                                   style="text-align: center !important;"/>

                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item.hk=='1'"
                                   type="text"
                                   v-model="item.repaymentDate2" placeholder="选择日期"
                                   @focus="showDatePicker($event,item,'repaymentDate')"
                                   style="text-align: center !important;    padding-left: 0 !important;text-indent: 0px;"/>
                            <span v-else>{{item.repaymentDate2}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">


                            <textarea v-if="item.isCheck&&item.hk=='1'" v-model="item.remark2"
                                      class="divMore"></textarea>
                            <span v-else>{{item.remark2}}</span>
                        </td>
                        <td style="vertical-align: bottom">
                            <template v-if="item.hk=='1'">
                                <input type="button" value="保存" class="btn oaBtn btn-sm" v-if="item.isCheck"
                                       @click="save(item.qkRepayment,item.yqRepayment)" style="margin-top: -6px;">
                                <input type="button" value="保存" class="btn oaBtn btn-sm"
                                       style="background: #ddd !important;cursor: no-drop;margin-top: -6px" v-else>
                            </template>
                            <template v-else>
                                <span></span>
                            </template>
                        </td>
                    </tr>
                    <tr v-for="(item2,i2) in item.repaymentParentList" class="benYwJieQ">
                        <td class="td-tanZongStyle-line" :class="showToday(item2)?'bH':''"
                            style="text-align: center !important;">
                            <span>{{item2.actualRepaymentDate}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" :class="showToday(item2)?'bH':''"
                            style="text-align: center !important;">
                            <template v-if="item2.hkType!='3'">
                                <span v-if="item.repaymentAmount=='0.00'&&compareDate(item.repaymentDate,getNowDate())"
                                      style="">未到期</span>

                                <span v-else>{{fmoney(item2.repaymentAmount)}}</span>
                            </template>
                            <template v-else>
                                <span>-</span>
                            </template>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2,'qianKuan')?'bH':''">
                            <span>{{fmoney(item2.everyRemainingArrear)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input type="text"
                                   v-if="((item.isCheck&&item.sumqkmoney!=0)||(item.isCheck&&item.repaymentAmount=='0.00')||(item.isCheck&&compareFiveDate(item.repaymentDate)>=0))&&item2.hk=='1'"
                                   @blur="strFormat($event.target,'contract.repayDKMent.'+i+'.qkRepayment'),repayMentMoney('repayDKMent',i,'0'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayDKMent.'+i+'.qkRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayDKMent.'+i+'.qkRepayment'),strFormat($event.target,'contract.repayDKMent.'+i+'.qkRepayment')"
                                   v-onedate="fmoney(item.qkRepayment)"
                                   style="text-align: center !important;"/>
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2,'faXi')?'bH':''">
                            <span>{{fmoney(item2.everyOverduePenalty)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'faXi')?'bH':''">
                            <span class="lineOne" style="padding-left: 0px !important;" v-if="item2.hkType=='3'">{{fmoney(item2.repaymentAmount)}}</span>
                            <span v-else>-</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item.sumyqmoney!=0&&item.hk=='1'"
                                   type="text"
                                   @blur="strFormat($event.target,'contract.repayDKMent.'+i+'.yqRepayment'),repayMentMoney('repayDKMent',i,'1'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayDKMent.'+i+'.yqRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayDKMent.'+i+'.yqRepayment'),strFormat($event.target,'contract.repayDKMent.'+i+'.yqRepayment')"
                                   v-onedate="fmoney(item.yqRepayment)"
                                   style="text-align: center !important;"/>

                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item2.hk=='1'"
                                   type="text"
                                   v-model="item.repaymentDate2" placeholder="选择日期"
                                   @focus="showDatePicker($event,item,'repaymentDate')"
                                   style="text-align: center !important;    padding-left: 0 !important;text-indent: 0px;"/>
                            <span v-else>{{item.repaymentDate2}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">


                            <textarea v-if="item2.isCheck&&item.hk=='1'" v-model="item.remark2"
                                      class="divMore"></textarea>
                            <span v-else>{{item.remark2}}</span>
                        </td>
                        <td style="vertical-align: bottom">
                            <template v-if="item2.hk=='1'">
                                <input type="button" value="保存" class="btn oaBtn btn-sm" v-if="item.isCheck"
                                       @click="save(item.qkRepayment,item.yqRepayment)" style="margin-top: -6px;">
                                <input type="button" value="保存" class="btn oaBtn btn-sm"
                                       style="background: #ddd !important;cursor: no-drop;margin-top: -6px" v-else>
                            </template>
                            <template v-else>
                                <span></span>
                            </template>
                        </td>
                    </tr>
                </template>
                <template
                        v-if="(!contract.repaySFMent||contract.repaySFMent.length<=0)&&(!contract.repayDKMent||contract.repayDKMent.length<=0)">
                    <tr>
                        <td colspan="14">当前没有欠款</td>
                    </tr>
                </template>
            </table>
        </template>
        <!--***************************************融资租赁**********************************************************-->
        <template v-if="contract.main.buyType=='融资租赁'">
            <!--***************************************融资租赁-销售合同欠款**********************************************************-->
            <table class="table-detail eachT" style="margin-top: 30px;">
                <tr>
                    <td colspan="13" class="td-module">
                        <span>销售合同欠款</span>
                    </td>
                </tr>
            </table>
            <table class="table-detail eachT">
                <tr>
                    <td class="td-title" style="width: 35px">选择<br>还款</td>
                    <td class="td-title" style="width: 75px">销售合同<br>还款日期</td>
                    <td class="td-title" style="width: 75px">约定还款金额<br>(元)</td>
                    <!--<td class="td-title" style="width: 8%;">约定利息<br>(元)</td>-->
                    <td class="td-title" style="width: 150px">实际还款日期</td>
                    <td class="td-title" style="width: 75px">还款金额<br>(元)</td>
                    <td class="td-title" style="width: 75px">剩余欠款<br>(元)</td>
                    <td class="td-title" style="width: 75px">还款<br>(元)</td>
                    <td class="td-title" style="width: 75px">逾期罚息<br>(元)</td>
                    <td class="td-title" style="width: 75px">免除金额<br>(元)</td>
                    <td class="td-title" style="width: 75px">还款<br>(元)</td>
                    <!--<td class="td-title" style="width: 75px">实收罚息<br>(元)</td>-->
                    <!--<td class="td-title" style="width: 114px;">上传凭证</td>-->
                    <!--<td class="td-title" style="width: 60px">录入人</td>-->
                    <td class="td-title" style="width: 75px">还款日期</td>
                    <td class="td-title">备注</td>
                    <td class="td-title" style="width: 90px">操作</td>
                </tr>
                <template v-for="(item,i) in contract.repayRZMent">
                    <tr class="benYwJieQ">
                        <td :rowspan="item.repaymentParentList.length+1"><input type="checkbox" @click="checked(item)"
                                                                                :checked="item.isCheck"
                                                                                v-if="item.overduePenalty>0||item.remainingArrears>0||compareFiveDate(item.repaymentDate)>=0"/>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :rowspan="item.repaymentParentList.length+1">
                            <span v-if="compareFiveDate(item.repaymentDate)>0" style="">{{item.repaymentDate}}</span>
                            <span v-else
                                  :class="changeRed('repayRZMent',i)?'jieQ':'yellow'">{{item.repaymentDate}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :rowspan="item.repaymentParentList.length+1">
                            <span v-if="compareFiveDate(item.repaymentDate)>0" style="">{{fmoney(item.contractRepaymentAmount)}}</span>

                            <span v-else :class="changeRed('repayRZMent',i)?'jieQ':'yellow'">{{fmoney(item.contractRepaymentAmount)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">
                            <span v-if="compareFiveDate(item.repaymentDate)>0"
                                  style="">{{item.actualRepaymentDate}}</span>

                            <span v-else class="lineOne">{{item.actualRepaymentDate}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">
                            <template v-if="item.hkType!='3'">
                                <span v-if="item.repaymentAmount=='0.00'&&compareDate(item.repaymentDate,getNowDate())"
                                      style="">未到期</span>

                                <span v-else>{{fmoney(item.repaymentAmount)}}</span>
                            </template>
                            <template v-else>
                                <span>-</span>
                            </template>
                        </td>

                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'qianKuan')?'bH':''">
                            <span v-if="compareFiveDate(item.repaymentDate)>0">-</span>
                            <span v-else>{{fmoney(item.everyRemainingArrear)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input type="text"
                                   v-if="((item.isCheck&&item.sumqkmoney!=0)||(item.isCheck&&item.repaymentAmount=='0.00')||(item.isCheck&&compareFiveDate(item.repaymentDate)>=0))&&item.hk=='1'"
                                   @blur="strFormat($event.target,'contract.repayRZMent.'+i+'.qkRepayment'),repayMentMoney('repayRZMent',i,'0'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayRZMent.'+i+'.qkRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayRZMent.'+i+'.qkRepayment'),strFormat($event.target,'contract.repayRZMent.'+i+'.qkRepayment')"
                                   v-onedate="fmoney(item.qkRepayment)" style="text-align: center !important;"
                            />
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'faXi')?'bH':''">
                            <span>{{fmoney(item.everyOverduePenalty)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'faXi')?'bH':''">
                            <span class="lineOne" style="padding-left: 0px !important;" v-if="item.hkType=='3'">{{fmoney(item.repaymentAmount)}}</span>
                            <span v-else>-</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item.sumyqmoney!=0&&item.hk=='1'"
                                   type="text"
                                   @blur="strFormat($event.target,'contract.repayRZMent.'+i+'.yqRepayment'),repayMentMoney('repayRZMent',i,'1'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayRZMent.'+i+'.yqRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayRZMent.'+i+'.yqRepayment'),strFormat($event.target,'contract.repayRZMent.'+i+'.yqRepayment')"
                                   v-onedate="fmoney(item.yqRepayment)" style="text-align: center !important;"
                            />
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item.hk=='1'"
                                   type="text"
                                   v-model="item.repaymentDate2" placeholder="选择日期"
                                   @focus="showDatePicker($event,item,'repaymentDate')"
                                   style="text-align: center !important;    padding-left: 0 !important;text-indent: 0px;"/>
                            <span v-else>{{item.repaymentDate2}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">


                            <textarea v-if="item.isCheck&&item.hk=='1'" v-model="item.remark2"
                                      class="divMore"></textarea>
                            <span v-else>{{item.remark2}}</span>
                        </td>
                        <td style="vertical-align: bottom">
                            <template v-if="item.hk=='1'">
                                <input type="button" value="保存" class="btn oaBtn btn-sm" v-if="item.isCheck"
                                       @click="save(item.qkRepayment,item.yqRepayment)" style="margin-top: -6px;">
                                <input type="button" value="保存" class="btn oaBtn btn-sm"
                                       style="background: #ddd !important;cursor: no-drop;margin-top: -6px" v-else>
                            </template>
                            <template v-else>
                                <span></span>
                            </template>
                        </td>
                    </tr>
                    <tr v-for="(item2,i2) in item.repaymentParentList" class="benYwJieQ">
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2)?'bH':''">
                            <span class="lineOne">{{item2.actualRepaymentDate}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2)?'bH':''">
                            <template v-if="item2.hkType!='3'">
                                <span v-if="item.repaymentAmount=='0.00'&&compareDate(item.repaymentDate,getNowDate())"
                                      style="">未到期</span>

                                <span v-else>{{fmoney(item2.repaymentAmount)}}</span>
                            </template>
                            <template v-else>
                                <span>-</span>
                            </template>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2,'qianKuan')?'bH':''">
                            <span>{{fmoney(item2.everyRemainingArrear)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input type="text"
                                   v-if="((item.isCheck&&item.sumqkmoney!=0)||(item.isCheck&&item.repaymentAmount=='0.00')||(item.isCheck&&compareFiveDate(item.repaymentDate)>=0))&&item2.hk=='1'"
                                   @blur="strFormat($event.target,'contract.repayRZMent.'+i+'.qkRepayment'),repayMentMoney('repayRZMent',i,'0'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayRZMent.'+i+'.qkRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayRZMent.'+i+'.qkRepayment'),strFormat($event.target,'contract.repayRZMent.'+i+'.qkRepayment')"
                                   v-onedate="fmoney(item.qkRepayment)" style="text-align: center !important;"
                            />
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2,'faXi')?'bH':''">
                            <span>{{fmoney(item2.everyOverduePenalty)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'faXi')?'bH':''">
                            <span class="lineOne" style="padding-left: 0px !important;" v-if="item2.hkType=='3'">{{fmoney(item2.repaymentAmount)}}</span>
                            <span v-else>-</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item.sumyqmoney!=0&&item2.hk=='1'"
                                   type="text"
                                   @blur="strFormat($event.target,'contract.repayRZMent.'+i+'.yqRepayment'),repayMentMoney('repayRZMent',i,'1'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayRZMent.'+i+'.yqRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayRZMent.'+i+'.yqRepayment'),strFormat($event.target,'contract.repayRZMent.'+i+'.yqRepayment')"
                                   v-onedate="fmoney(item.yqRepayment)" style="text-align: center !important;"
                            />
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item2.hk=='1'"
                                   type="text"
                                   v-model="item.repaymentDate2" placeholder="选择日期"
                                   @focus="showDatePicker($event,item,'repaymentDate')"
                                   style="text-align: center !important;    padding-left: 0 !important;text-indent: 0px;"/>
                            <span v-else>{{item.repaymentDate2}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">


                            <textarea v-if="item.isCheck&&item2.hk=='1'" v-model="item.remark2"
                                      class="divMore"></textarea>
                            <span v-else>{{item.remark2}}</span>
                        </td>
                        <td style="vertical-align: bottom">
                            <template v-if="item2.hk=='1'">
                                <input type="button" value="保存" class="btn oaBtn btn-sm" v-if="item.isCheck"
                                       @click="save(item.qkRepayment,item.yqRepayment)" style="margin-top: -6px;">
                                <input type="button" value="保存" class="btn oaBtn btn-sm"
                                       style="background: #ddd !important;cursor: no-drop;margin-top: -6px" v-else>
                            </template>
                            <template v-else>
                                <span></span>
                            </template>
                        </td>
                    </tr>
                </template>
                <template v-if="!contract.repayRZMent||contract.repayRZMent.length<=0">
                    <tr>
                        <td colspan="13">当前没有欠款</td>
                    </tr>
                </template>
            </table>
            <!--***************************************融资租赁-XXX融资合同欠款**********************************************************-->
            <table class="table-detail eachT" style="margin-top: 30px;">
                <tr>
                    <td colspan="12" class="td-module">
                        <span style="text-align: center">{{contract.main.brandName}}融资合同欠款</span>
                    </td>
                </tr>
            </table>
            <table class="table-detail eachT">
                <tr>
                    <td class="td-title" style="width: 35px">选择<br>还款</td>
                    <td class="td-title" style="width: 75px">融资合同<br>还款日期</td>
                    <td class="td-title" style="width:75px">约定还款金额<br>(元)</td>
                    <td class="td-title" style="width: 150px">实际还款日期</td>
                    <td class="td-title" style="width: 75px">还款金额<br>(元)</td>
                    <td class="td-title" style="width: 75px">剩余欠款<br>(元)</td>
                    <td class="td-title" style="width: 92px">还款类型</td>
                    <td class="td-title" style="width: 75px">还款<br>(元)</td>
                    <td class="td-title" style="width:75px">逾期罚息<br>(元)</td>
                    <td class="td-title" style="width: 75px">还款<br>(元)</td>
                    <!--<td class="td-title" style="width: 75px">实收罚息<br>(元)</td>-->
                    <!--<td class="td-title" style="width: 114px">上传凭证</td>-->
                    <!--<td class="td-title" style="width: 60px">录入人</td>-->
                    <td class="td-title" style="width: 75px">还款日期</td>
                    <td class="td-title">备注</td>
                    <td class="td-title" style="width: 90px">操作</td>

                </tr>
                <template v-if="!contract.repayRZMentFn||contract.repayRZMentFn.length<=0">
                    <tr>
                        <td colspan="13">当前没有欠款</td>
                    </tr>
                </template>
                <template v-for="(item,i) in contract.repayRZMentFn">
                    <tr class="benYwJieQ">
                        <td :rowspan="item.repaymentParentList.length+1"><input type="checkbox" @click="checked(item)"
                                                                                :checked="item.isCheck"/></td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :rowspan="item.repaymentParentList.length+1">
                            <span v-if="compareFiveDate(item.financingDate)>0" style="">{{item.financingDate}}</span>

                            <span v-else class="lineOne"
                                  :class="changeRedFn('repayRZMentFn',i)?'jieQ':'yellow'">{{item.financingDate}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"

                            :rowspan="item.repaymentParentList.length+1">
                            <span v-if="compareFiveDate(item.financingDate)>0"
                                  style="">{{fmoney(item.financingMoney)}}</span>

                            <span v-else class="lineOne"
                                  :class="changeRedFn('repayRZMentFn',i)?'jieQ':'yellow'">{{fmoney(item.financingMoney)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">
                            <span v-if="compareFiveDate(item.financingDate)>0" style="">{{item.advancesDate}}</span>

                            <span v-else class="lineOne">{{item.advancesDate}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">
                            <span v-if="item.advancesMoney=='0.00'&&compareDate(item.financingDate,getNowDate())"
                                  style="">未到期</span>
                            <span class="lineOne" v-else>{{fmoney(item.advancesMoney)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'qianKuan')?'bH':''">
                            <span v-if="compareFiveDate(item.financingDate)>0">-</span>
                            <span v-else>{{fmoney(item.everyRemainingArrear)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'qianKuan')?'bH':''">
                            <select v-model="item.repaymentType" v-if="item.isCheck&&item.hk=='1'"
                                    style="color: rgb(42, 140, 236) !important;text-align: center !important;">
                                <option v-for="(item,i) in repaymentTypeList" v-bind:value="item.value">{{item.name}}</option>
                            </select>
                            <span v-else style="text-align: center !important;">{{item.repaymentType}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input type="text"
                                   v-if="((item.isCheck&&item.sumqkmoney!=0)||(item.isCheck&&item.advancesMoney=='0.00')||(item.isCheck&&compareFiveDate(item.financingDate)>=0))&&item.hk=='1'"
                                   @blur="strFormat($event.target,'contract.repayRZMentFn.'+i+'.qkRepayment'),repayMentMoney('repayRZMentFn',i,'0'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayRZMentFn.'+i+'.qkRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayRZMentFn.'+i+'.qkRepayment'),strFormat($event.target,'contract.repayRZMentFn.'+i+'.qkRepayment')"
                                   v-onedate="fmoney(item.qkRepayment)"
                                   style="text-align: center !important;"/>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday2(item)?'bH':''">
                            <input v-if="item.isCheck&&item.hk=='1'"
                                   type="text"
                                   @blur="strFormat($event.target,'contract.repayRZMentFn.'+i+'.sumyqmoney')"
                                   @focus="strFormatF($event.target,'contract.repayRZMentFn.'+i+'.sumyqmoney')"
                                   @click.once="strFormatF($event.target,'contract.repayRZMentFn.'+i+'.sumyqmoney'),strFormat($event.target,'contract.repayRZMentFn.'+i+'.sumyqmoney')"
                                   v-onedate="fmoney(item.sumyqmoney)"
                                   style="text-align: center !important;"/>

                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input type="text" v-if="item.isCheck&&item.sumyqmoney!=0&&item.hk=='1'"
                                   @blur="strFormat($event.target,'contract.repayRZMentFn.'+i+'.yqRepayment'),repayMentMoney('repayRZMentFn',i,'1'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayRZMentFn.'+i+'.yqRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayRZMentFn.'+i+'.yqRepayment'),strFormat($event.target,'contract.repayRZMentFn.'+i+'.yqRepayment')"
                                   v-onedate="fmoney(item.yqRepayment)" style="text-align: center !important;"
                            />
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item.hk=='1'"
                                   type="text"
                                   v-model="item.repaymentDate2" placeholder="选择日期"
                                   @focus="showDatePicker($event,item,'repaymentDate')"
                                   style="text-align: center !important;    padding-left: 0 !important;text-indent: 0px;"/>
                            <span v-else>{{item.repaymentDate2}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">


                            <textarea v-if="item.isCheck&&item.hk=='1'" v-model="item.remark2"
                                      class="divMore"></textarea>
                            <span v-else>{{item.remark2}}</span>
                        </td>
                        <td style="vertical-align: bottom">
                            <template v-if="item.hk=='1'">
                                <input type="button" value="保存" class="btn oaBtn btn-sm" v-if="item.isCheck"
                                       @click="save(item.qkRepayment,item.yqRepayment)" style="margin-top: -6px;">
                                <input type="button" value="保存" class="btn oaBtn btn-sm"
                                       style="background: #ddd !important;cursor: no-drop;margin-top: -6px" v-else>
                            </template>
                            <template v-else>
                                <span></span>
                            </template>
                        </td>
                    </tr>
                    <tr v-for="(item2,i2) in item.repaymentParentList" class="benYwJieQ">
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2)?'bH':''"
                        >
                            <span class="lineOne" style="padding-left: 0px !important;">{{item2.advancesDate}}</span>

                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2)?'bH':''">
                            <span v-if="item2.advancesMoney=='0.00'&&compareDate(item2.financingDate,getNowDate())">未到期</span>
                            <span class="lineOne" v-else>{{fmoney(item2.advancesMoney)}}</span>

                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2,'qianKuan')?'bH':''">
                            <span>{{fmoney(item2.everyRemainingArrear)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'qianKuan')?'bH':''">
                            <select v-model="item2.repaymentType" v-if="item.isCheck&&item2.hk=='1'"
                                    style="color: rgb(42, 140, 236) !important;text-align: center !important;">
                                <option v-for="(item,i) in repaymentTypeList" v-bind:value="item.value">{{item.name}}</option>
                            </select>
                            <span v-else style="text-align: center !important;">{{item.repaymentType}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input type="text"
                                   v-if="((item.isCheck&&item.sumqkmoney!=0)||(item.isCheck&&item.advancesMoney=='0.00')||(item.isCheck&&compareFiveDate(item.financingDate)>=0))&&item2.hk=='1'"
                                   @blur="strFormat($event.target,'contract.repayRZMentFn.'+i+'.qkRepayment'),repayMentMoney('repayRZMentFn',i,'0'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayRZMentFn.'+i+'.qkRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayRZMentFn.'+i+'.qkRepayment'),strFormat($event.target,'contract.repayRZMentFn.'+i+'.qkRepayment')"
                                   v-onedate="fmoney(item.qkRepayment)"
                                   style="text-align: center !important;"/>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday2(item)?'bH':''">
                            <input v-if="item.isCheck&&item2.hk=='1'"
                                   type="text"
                                   @blur="strFormat($event.target,'contract.repayRZMentFn.'+i+'.sumyqmoney')"
                                   @focus="strFormatF($event.target,'contract.repayRZMentFn.'+i+'.sumyqmoney')"
                                   @click.once="strFormatF($event.target,'contract.repayRZMentFn.'+i+'.sumyqmoney'),strFormat($event.target,'contract.repayRZMentFn.'+i+'.sumyqmoney')"
                                   v-onedate="fmoney(item.sumyqmoney)"
                                   style="text-align: center !important;"/>

                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input type="text" v-if="item.isCheck&&item.sumyqmoney!=0&&item2.hk=='1'"
                                   @blur="strFormat($event.target,'contract.repayRZMentFn.'+i+'.yqRepayment'),repayMentMoney('repayRZMentFn',i,'1'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayRZMentFn.'+i+'.yqRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayRZMentFn.'+i+'.yqRepayment'),strFormat($event.target,'contract.repayRZMentFn.'+i+'.yqRepayment')"
                                   v-onedate="fmoney(item.yqRepayment)" style="text-align: center !important;"
                            />
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item2.hk=='1'"
                                   type="text"
                                   v-model="item.repaymentDate2" placeholder="选择日期"
                                   @focus="showDatePicker($event,item,'repaymentDate')"
                                   style="text-align: center !important;    padding-left: 0 !important;text-indent: 0px;"/>
                            <span v-else>{{item.repaymentDate2}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">


                            <textarea v-if="item.isCheck&&item2.hk=='1'" v-model="item.remark2"
                                      class="divMore"></textarea>
                            <span v-else>{{item.remark2}}</span>
                        </td>
                        <td style="vertical-align: bottom">
                            <template v-if="item2.hk=='1'">
                                <input type="button" value="保存" class="btn oaBtn btn-sm" v-if="item.isCheck"
                                       @click="save(item.qkRepayment,item.yqRepayment)" style="margin-top: -6px;">
                                <input type="button" value="保存" class="btn oaBtn btn-sm"
                                       style="background: #ddd !important;cursor: no-drop;margin-top: -6px" v-else>
                            </template>
                            <template v-else>
                                <span></span>
                            </template>
                        </td>

                    </tr>
                </template>
            </table>

        </template>
        <!--***************************************融资租赁打包**********************************************************-->
        <template v-if="contract.main.buyType=='融资租赁打包'">
            <!--***************************************融资租赁打包-销售合同欠款**********************************************************-->
            <table class="table-detail eachT" style="margin-top: 30px;">
                <tr>
                    <td colspan="13" class="td-module">
                        <span>销售合同欠款</span>
                    </td>
                </tr>
            </table>
            <table class="table-detail eachT">
                <tr>
                    <td class="td-title" style="width: 35px">选择<br>还款</td>
                    <td class="td-title" style="width: 75px">销售合同<br>还款日期</td>
                    <td class="td-title" style="width: 75px">约定还款金额<br>(元)</td>
                    <!--<td class="td-title" style="width: 8%;">约定利息<br>(元)</td>-->
                    <td class="td-title" style="width: 150px">实际还款日期</td>
                    <td class="td-title" style="width: 75px">还款金额<br>(元)</td>
                    <td class="td-title" style="width: 75px">剩余欠款<br>(元)</td>
                    <td class="td-title" style="width: 75px">还款<br>(元)</td>
                    <td class="td-title" style="width: 75px">逾期罚息<br>(元)</td>
                    <td class="td-title" style="width: 75px">免除金额<br>(元)</td>

                    <td class="td-title" style="width: 75px">还款<br>(元)</td>
                    <!--<td class="td-title" style="width: 75px">实收罚息<br>(元)</td>-->
                    <!--<td class="td-title" style="width: 114px;">上传凭证</td>-->
                    <!--<td class="td-title" style="width: 60px">录入人</td>-->
                    <td class="td-title" style="width: 75px">还款日期</td>
                    <td class="td-title">备注</td>
                    <td class="td-title" style="width: 90px">操作</td>
                </tr>
                <template v-for="(item,i) in contract.repayRZDBMent">
                    <tr class="benYwJieQ">
                        <td :rowspan="item.repaymentParentList.length+1"><input type="checkbox" @click="checked(item)"
                                                                                :checked="item.isCheck"
                                                                                v-if="item.overduePenalty>0||item.remainingArrears>0||compareFiveDate(item.repaymentDate)>=0"/>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :rowspan="item.repaymentParentList.length+1">
                            <span v-if="compareFiveDate(item.repaymentDate)>0" style="">{{item.repaymentDate}}</span>
                            <span v-else
                                  :class="changeRed('repayRZDBMent',i)?'jieQ':'yellow'">{{item.repaymentDate}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :rowspan="item.repaymentParentList.length+1">
                            <span v-if="compareFiveDate(item.repaymentDate)>0" style="">{{fmoney(item.contractRepaymentAmount)}}</span>

                            <span v-else :class="changeRed('repayRZDBMent',i)?'jieQ':'yellow'">{{fmoney(item.contractRepaymentAmount)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">
                            <span v-if="compareFiveDate(item.repaymentDate)>0"
                                  style="">{{item.actualRepaymentDate}}</span>

                            <span v-else class="lineOne">{{item.actualRepaymentDate}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">
                            <template v-if="item.hkType!='3'">
                                <span v-if="item.repaymentAmount=='0.00'&&compareDate(item.repaymentDate,getNowDate())"
                                      style="">未到期</span>

                                <span v-else>{{fmoney(item.repaymentAmount)}}</span>
                            </template>
                            <template v-else>
                                <span>-</span>
                            </template>
                        </td>

                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'qianKuan')?'bH':''">
                            <span v-if="compareFiveDate(item.repaymentDate)>0">-</span>
                            <span v-else>{{fmoney(item.everyRemainingArrear)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input type="text"
                                   v-if="((item.isCheck&&item.sumqkmoney!=0)||(item.isCheck&&item.repaymentAmount=='0.00')||(item.isCheck&&compareFiveDate(item.repaymentDate)>=0))&&item.hk=='1'"
                                   @blur="strFormat($event.target,'contract.repayRZDBMent.'+i+'.qkRepayment'),repayMentMoney('repayRZDBMent',i,'0'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayRZDBMent.'+i+'.qkRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayRZDBMent.'+i+'.qkRepayment'),strFormat($event.target,'contract.repayRZDBMent.'+i+'.qkRepayment')"
                                   v-onedate="fmoney(item.qkRepayment)" style="text-align: center !important;"
                            />
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'faXi')?'bH':''">
                            <span>{{fmoney(item.everyOverduePenalty)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'faXi')?'bH':''">
                            <span class="lineOne" style="padding-left: 0px !important;" v-if="item.hkType=='3'">{{fmoney(item.repaymentAmount)}}</span>
                            <span v-else>-</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item.sumyqmoney!=0&&item.hk=='1'"
                                   type="text"
                                   @blur="strFormat($event.target,'contract.repayRZDBMent.'+i+'.yqRepayment'),repayMentMoney('repayRZDBMent',i,'1'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayRZDBMent.'+i+'.yqRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayRZDBMent.'+i+'.yqRepayment'),strFormat($event.target,'contract.repayRZDBMent.'+i+'.yqRepayment')"
                                   v-onedate="fmoney(item.yqRepayment)" style="text-align: center !important;"
                            />
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item.hk=='1'"
                                   type="text"
                                   v-model="item.repaymentDate2" placeholder="选择日期"
                                   @focus="showDatePicker($event,item,'repaymentDate')"
                                   style="text-align: center !important;    padding-left: 0 !important;text-indent: 0px;"/>
                            <span v-else>{{item.repaymentDate2}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">


                            <textarea v-if="item.isCheck&&item.hk=='1'" v-model="item.remark2"
                                      class="divMore"></textarea>
                            <span v-else>{{item.remark2}}</span>
                        </td>
                        <td style="vertical-align: bottom">
                            <template v-if="item.hk=='1'">
                                <input type="button" value="保存" class="btn oaBtn btn-sm" v-if="item.isCheck"
                                       @click="save(item.qkRepayment,item.yqRepayment)" style="margin-top: -6px;">
                                <input type="button" value="保存" class="btn oaBtn btn-sm"
                                       style="background: #ddd !important;cursor: no-drop;margin-top: -6px" v-else>
                            </template>
                            <template v-else>
                                <span></span>
                            </template>
                        </td>
                    </tr>
                    <tr v-for="(item2,i2) in item.repaymentParentList" class="benYwJieQ">
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2)?'bH':''">
                            <span class="lineOne">{{item2.actualRepaymentDate}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2)?'bH':''">
                            <template v-if="item2.hkType!='3'">
                                <span v-if="item.repaymentAmount=='0.00'&&compareDate(item.repaymentDate,getNowDate())"
                                      style="">未到期</span>

                                <span v-else>{{fmoney(item2.repaymentAmount)}}</span>
                            </template>
                            <template v-else>
                                <span>-</span>
                            </template>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2,'qianKuan')?'bH':''">
                            <span>{{fmoney(item2.everyRemainingArrear)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input type="text"
                                   v-if="((item.isCheck&&item.sumqkmoney!=0)||(item.isCheck&&item.repaymentAmount=='0.00')||(item.isCheck&&compareFiveDate(item.repaymentDate)>=0))&&item2.hk=='1'"
                                   @blur="strFormat($event.target,'contract.repayRZDBMent.'+i+'.qkRepayment'),repayMentMoney('repayRZDBMent',i,'0'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayRZDBMent.'+i+'.qkRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayRZDBMent.'+i+'.qkRepayment'),strFormat($event.target,'contract.repayRZDBMent.'+i+'.qkRepayment')"
                                   v-onedate="fmoney(item.qkRepayment)" style="text-align: center !important;"
                            />
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2,'faXi')?'bH':''">
                            <span>{{fmoney(item2.everyOverduePenalty)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'faXi')?'bH':''">
                            <span class="lineOne" style="padding-left: 0px !important;" v-if="item2.hkType=='3'">{{fmoney(item2.repaymentAmount)}}</span>
                            <span v-else>-</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item.sumyqmoney!=0&&item2.hk=='1'"
                                   type="text"
                                   @blur="strFormat($event.target,'contract.repayRZDBMent.'+i+'.yqRepayment'),repayMentMoney('repayRZDBMent',i,'1'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayRZDBMent.'+i+'.yqRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayRZDBMent.'+i+'.yqRepayment'),strFormat($event.target,'contract.repayRZDBMent.'+i+'.yqRepayment')"
                                   v-onedate="fmoney(item.yqRepayment)" style="text-align: center !important;"
                            />
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item2.hk=='1'"
                                   type="text"
                                   v-model="item.repaymentDate2" placeholder="选择日期"
                                   @focus="showDatePicker($event,item,'repaymentDate')"
                                   style="text-align: center !important;    padding-left: 0 !important;text-indent: 0px;"/>
                            <span v-else>{{item.repaymentDate2}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">


                            <textarea v-if="item.isCheck&&item2.hk=='1'" v-model="item.remark2"
                                      class="divMore"></textarea>
                            <span v-else>{{item.remark2}}</span>
                        </td>
                        <td style="vertical-align: bottom">
                            <template v-if="item2.hk=='1'">
                                <input type="button" value="保存" class="btn oaBtn btn-sm" v-if="item.isCheck"
                                       @click="save(item.qkRepayment,item.yqRepayment)" style="margin-top: -6px;">
                                <input type="button" value="保存" class="btn oaBtn btn-sm"
                                       style="background: #ddd !important;cursor: no-drop;margin-top: -6px" v-else>
                            </template>
                            <template v-else>
                                <span></span>
                            </template>
                        </td>


                    </tr>
                </template>
                <template v-if="!contract.repayRZDBMent||contract.repayRZDBMent.length<=0">
                    <tr>
                        <td colspan="13">当前没有欠款</td>
                    </tr>
                </template>
            </table>
            <!--***************************************融资租赁打包-XXX融资合同欠款**********************************************************-->
            <table class="table-detail eachT" style="margin-top: 30px;">
                <tr>
                    <td colspan="13" class="td-module">
                        <span>{{contract.main.brandName}}融资合同欠款</span>
                    </td>
                </tr>
            </table>
            <table class="table-detail eachT">
                <tr>
                    <td class="td-title" style="width: 35px">选择<br>还款</td>
                    <td class="td-title" style="width: 75px">融资合同<br>还款日期</td>
                    <td class="td-title" style="width:75px">约定还款金额<br>(元)</td>
                    <td class="td-title" style="width: 150px">实际还款日期</td>
                    <td class="td-title" style="width: 75px">还款金额<br>(元)</td>
                    <td class="td-title" style="width: 75px">剩余欠款<br>(元)</td>
                    <td class="td-title" style="width: 75px">还款<br>(元)</td>
                    <td class="td-title" style="width:75px">逾期罚息<br>(元)</td>
                    <td class="td-title" style="width: 75px">还款<br>(元)</td>
                    <!--<td class="td-title" style="width: 75px">实收罚息<br>(元)</td>-->
                    <!--<td class="td-title" style="width: 114px">上传凭证</td>-->
                    <!--<td class="td-title" style="width: 60px">录入人</td>-->
                    <td class="td-title" style="width: 75px">还款日期</td>
                    <td class="td-title">备注</td>
                    <td class="td-title" style="width: 90px">操作</td>

                </tr>
                <template v-if="!contract.repayRZMentFnDB||contract.repayRZMentFnDB.length<=0">
                    <tr>
                        <td colspan="13">当前没有欠款</td>
                    </tr>
                </template>
                <template v-for="(item,i) in contract.repayRZMentFnDB">
                    <tr class="benYwJieQ">
                        <td :rowspan="item.repaymentParentList.length+1"><input type="checkbox" @click="checked(item)"
                                                                                :checked="item.isCheck"/></td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :rowspan="item.repaymentParentList.length+1">
                            <span v-if="compareFiveDate(item.financingDate)>0" style="">{{item.financingDate}}</span>

                            <span v-else class="lineOne"
                                  :class="changeRedFn('repayRZMentFnDB',i)?'jieQ':'yellow'">{{item.financingDate}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"

                            :rowspan="item.repaymentParentList.length+1">
                            <span v-if="compareFiveDate(item.financingDate)>0"
                                  style="">{{fmoney(item.financingMoney)}}</span>

                            <span v-else class="lineOne"
                                  :class="changeRedFn('repayRZMentFnDB',i)?'jieQ':'yellow'">{{fmoney(item.financingMoney)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">
                            <span v-if="compareFiveDate(item.financingDate)>0" style="">{{item.advancesDate}}</span>

                            <span v-else class="lineOne">{{item.advancesDate}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">
                            <span v-if="item.advancesMoney=='0.00'&&compareDate(item.financingDate,getNowDate())"
                                  style="">未到期</span>
                            <span class="lineOne" v-else>{{fmoney(item.advancesMoney)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'qianKuan')?'bH':''">
                            <span v-if="compareFiveDate(item.financingDate)>0">-</span>
                            <span v-else>{{fmoney(item.everyRemainingArrear)}}</span>
                        </td>

                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input type="text"
                                   v-if="((item.isCheck&&item.sumqkmoney!=0)||(item.isCheck&&item.advancesMoney=='0.00')||(item.isCheck&&compareFiveDate(item.financingDate)>=0))&&item.hk=='1'"
                                   @blur="strFormat($event.target,'contract.repayRZMentFnDB.'+i+'.qkRepayment'),repayMentMoney('repayRZMentFnDB',i,'0'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayRZMentFnDB.'+i+'.qkRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayRZMentFnDB.'+i+'.qkRepayment'),strFormat($event.target,'contract.repayRZMentFnDB.'+i+'.qkRepayment')"
                                   v-onedate="fmoney(item.qkRepayment)"
                                   style="text-align: center !important;"/>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday2(item)?'bH':''">
                            <input v-if="item.isCheck&&item.hk=='1'"
                                   type="text"
                                   @blur="strFormat($event.target,'contract.repayRZMentFnDB.'+i+'.sumyqmoney')"
                                   @focus="strFormatF($event.target,'contract.repayRZMentFnDB.'+i+'.sumyqmoney')"
                                   @click.once="strFormatF($event.target,'contract.repayRZMentFnDB.'+i+'.sumyqmoney'),strFormat($event.target,'contract.repayRZMentFnDB.'+i+'.sumyqmoney')"
                                   v-onedate="fmoney(item.sumyqmoney)"
                                   style="text-align: center !important;"/>

                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input type="text" v-if="item.isCheck&&item.sumyqmoney!=0&&item.hk=='1'"
                                   @blur="strFormat($event.target,'contract.repayRZMentFnDB.'+i+'.yqRepayment'),repayMentMoney('repayRZMentFnDB',i,'1'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayRZMentFnDB.'+i+'.yqRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayRZMentFnDB.'+i+'.yqRepayment'),strFormat($event.target,'contract.repayRZMentFnDB.'+i+'.yqRepayment')"
                                   v-onedate="fmoney(item.yqRepayment)" style="text-align: center !important;"
                            />
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item.hk=='1'"
                                   type="text"
                                   v-model="item.repaymentDate2" placeholder="选择日期"
                                   @focus="showDatePicker($event,item,'repaymentDate')"
                                   style="text-align: center !important;    padding-left: 0 !important;text-indent: 0px;"/>
                            <span v-else>{{item.repaymentDate2}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">


                            <textarea v-if="item.isCheck&&item.hk=='1'" v-model="item.remark2"
                                      class="divMore"></textarea>
                            <span v-else>{{item.remark2}}</span>
                        </td>
                        <td style="vertical-align: bottom">
                            <template v-if="item.hk=='1'">
                                <input type="button" value="保存" class="btn oaBtn btn-sm" v-if="item.isCheck"
                                       @click="save(item.qkRepayment,item.financingDate)" style="margin-top: -6px;">
                                <input type="button" value="保存" class="btn oaBtn btn-sm"
                                       style="background: #ddd !important;cursor: no-drop;margin-top: -6px" v-else>
                            </template>
                            <template v-else>
                                <span></span>
                            </template>
                        </td>
                    </tr>
                    <tr v-for="(item2,i2) in item.repaymentParentList" class="benYwJieQ">
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2)?'bH':''"
                        >
                            <span class="lineOne" style="padding-left: 0px !important;">{{item2.advancesDate}}</span>

                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2)?'bH':''">
                            <span v-if="item2.advancesMoney=='0.00'&&compareDate(item2.financingDate,getNowDate())">未到期</span>
                            <span class="lineOne" v-else>{{fmoney(item2.advancesMoney)}}</span>

                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2,'qianKuan')?'bH':''">
                            <span>{{fmoney(item2.everyRemainingArrear)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input type="text"
                                   v-if="((item.isCheck&&item.sumqkmoney!=0)||(item.isCheck&&item.advancesMoney=='0.00')||(item.isCheck&&compareFiveDate(item.repaymentDate)>=0))&&item2.hk=='1'"
                                   @blur="strFormat($event.target,'contract.repayRZMentFnDB.'+i+'.qkRepayment'),repayMentMoney('repayRZMentFnDB',i,'0'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayRZMentFnDB.'+i+'.qkRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayRZMentFnDB.'+i+'.qkRepayment'),strFormat($event.target,'contract.repayRZMentFnDB.'+i+'.qkRepayment')"
                                   v-onedate="fmoney(item.qkRepayment)"
                                   style="text-align: center !important;"/>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday2(item)?'bH':''">
                            <input v-if="item.isCheck&&item2.hk=='1'"
                                   type="text"
                                   @blur="strFormat($event.target,'contract.repayRZMentFnDB.'+i+'.sumyqmoney')"
                                   @focus="strFormatF($event.target,'contract.repayRZMentFnDB.'+i+'.sumyqmoney')"
                                   @click.once="strFormatF($event.target,'contract.repayRZMentFnDB.'+i+'.sumyqmoney'),strFormat($event.target,'contract.repayRZMentFnDB.'+i+'.sumyqmoney')"
                                   v-onedate="fmoney(item.sumyqmoney)"
                                   style="text-align: center !important;"/>

                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input type="text" v-if="item.isCheck&&item.sumyqmoney!=0&&item2.hk=='1'"
                                   @blur="strFormat($event.target,'contract.repayRZMentFnDB.'+i+'.yqRepayment'),repayMentMoney('repayRZMentFnDB',i,'1'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayRZMentFnDB.'+i+'.yqRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayRZMentFnDB.'+i+'.yqRepayment'),strFormat($event.target,'contract.repayRZMentFnDB.'+i+'.yqRepayment')"
                                   v-onedate="fmoney(item.yqRepayment)" style="text-align: center !important;"
                            />
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item2.hk=='1'"
                                   type="text"
                                   v-model="item.repaymentDate2" placeholder="选择日期"
                                   @focus="showDatePicker($event,item,'repaymentDate')"
                                   style="text-align: center !important;    padding-left: 0 !important;text-indent: 0px;"/>
                            <span v-else>{{item.repaymentDate2}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">


                            <textarea v-if="item.isCheck&&item2.hk=='1'" v-model="item.remark2"
                                      class="divMore"></textarea>
                            <span v-else>{{item.remark2}}</span>
                        </td>
                        <td style="vertical-align: bottom">
                            <template v-if="item2.hk=='1'">
                                <input type="button" value="保存" class="btn oaBtn btn-sm" v-if="item.isCheck"
                                       @click="save(item.qkRepayment,item.yqRepayment)" style="margin-top: -6px;">
                                <input type="button" value="保存" class="btn oaBtn btn-sm"
                                       style="background: #ddd !important;cursor: no-drop;margin-top: -6px" v-else>
                            </template>
                            <template v-else>
                                <span></span>
                            </template>
                        </td>
                    </tr>
                </template>
            </table>
        </template>
        <!--***************************************内部分期-分期款欠款**********************************************************-->
        <template v-if="contract.main.buyType=='内部分期'">
            <table class="table-detail eachT" style="margin-top: 30px;">
                <tr>
                    <td colspan="14" class="td-module">
                        <span>分期款欠款</span>
                    </td>
                </tr>
            </table>
            <table class="table-detail eachT">
                <tr>
                    <td class="td-title" style="width: 35px">选择<br>还款</td>
                    <td class="td-title" style="width: 75px">销售合同<br>还款日期</td>
                    <td class="td-title" style="width: 75px">约定还款金额<br>(元)</td>
                    <td class="td-title" style="width: 75px">约定利息<br>(元)</td>
                    <!--<td class="td-title" style="width: 8%;">约定利息<br>(元)</td>-->
                    <td class="td-title" style="width:75px">实际还款<br>日期</td>
                    <td class="td-title" style="width: 75px">还款金额<br>(元)</td>
                    <td class="td-title" style="width: 75px">剩余欠款<br>(元)</td>
                    <td class="td-title" style="width: 75px">还款<br>(元)</td>
                    <td class="td-title" style="width: 75px">逾期罚息<br>(元)</td>
                    <td class="td-title" style="width: 75px">免除金额<br>(元)</td>

                    <td class="td-title" style="width: 75px">还款<br>(元)</td>
                    <!--<td class="td-title" style="width: 75px">实收罚息<br>(元)</td>-->
                    <!--<td class="td-title" style="width: 114px">上传凭证</td>-->
                    <!--<td class="td-title" style="width: 60px">录入人</td>-->

                    <td class="td-title" style="width: 75px">还款日期</td>
                    <td class="td-title">备注</td>
                    <td class="td-title" style="width: 90px">操作</td>
                </tr>
                <template v-for="(item,i) in contract.repayFQMent">
                    <tr class="benYwJieQ">
                        <td :rowspan="item.repaymentParentList.length+1"><input type="checkbox" @click="checked(item)"
                                                                                :checked="item.isCheck"
                                                                                v-if="item.overduePenalty>0||item.remainingArrears>0||compareFiveDate(item.repaymentDate)>=0"/>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :rowspan="item.repaymentParentList.length+1">
                            <span v-if="compareFiveDate(item.repaymentDate)>0" style="">{{item.repaymentDate}}</span>
                            <span :class="changeRed('repayFQMent',i)?'jieQ':'yellow'"
                                  v-else>{{item.repaymentDate}}</span>

                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :rowspan="item.repaymentParentList.length+1">
                            <span v-if="compareFiveDate(item.repaymentDate)>0"
                                  style="">{{fmoney(item.principal)}}</span>
                            <span v-else
                                  :class="changeRed('repayFQMent',i)?'jieQ':'yellow'">{{fmoney(item.principal)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :rowspan="item.repaymentParentList.length+1">
                            <span v-if="compareFiveDate(item.repaymentDate)>0" style="">{{fmoney(item.interest)}}</span>
                            <span v-else
                                  :class="changeRed('repayFQMent',i)?'jieQ':'yellow'">{{fmoney(item.interest)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">
                            <span v-if="compareFiveDate(item.repaymentDate)>0"
                                  style="">{{item.actualRepaymentDate}}</span>

                            <span v-else class="lineOne">{{item.actualRepaymentDate}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">
                            <template v-if="item.hkType!='3'">
                                <span v-if="item.repaymentAmount=='0.00'&&compareDate(item.repaymentDate,getNowDate())"
                                      style="">未到期</span>

                                <span v-else>{{fmoney(item.repaymentAmount)}}</span>
                            </template>
                            <template v-else>
                                <span>-</span>
                            </template>
                        </td>

                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'qianKuan')?'bH':''">
                            <span v-if="compareFiveDate(item.repaymentDate)>0">-</span>
                            <span v-else>{{fmoney(item.everyRemainingArrear)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input type="text"
                                   v-if="((item.isCheck&&item.sumqkmoney!=0)||(item.isCheck&&item.repaymentAmount=='0.00')||(item.isCheck&&compareFiveDate(item.repaymentDate)>=0))&&item.hk=='1'"
                                   @blur="strFormat($event.target,'contract.repayFQMent.'+i+'.qkRepayment'),repayMentMoney('repayFQMent',i,'0'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayFQMent.'+i+'.qkRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayFQMent.'+i+'.qkRepayment'),strFormat($event.target,'contract.repayFQMent.'+i+'.qkRepayment')"
                                   v-onedate="fmoney(item.qkRepayment)"
                                   style="text-align: center !important;"/>
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'faXi')?'bH':''">
                            <span>{{fmoney(item.everyOverduePenalty)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'faXi')?'bH':''">
                            <span class="lineOne" style="padding-left: 0px !important;" v-if="item.hkType=='3'">{{fmoney(item.repaymentAmount)}}</span>
                            <span v-else>-</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item.sumyqmoney!=0&&item.hk=='1'"
                                   type="text"
                                   @blur="strFormat($event.target,'contract.repayFQMent.'+i+'.yqRepayment'),repayMentMoney('repayFQMent',i,'1'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayFQMent.'+i+'.yqRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayFQMent.'+i+'.yqRepayment'),strFormat($event.target,'contract.repayFQMent.'+i+'.yqRepayment')"
                                   v-onedate="fmoney(item.yqRepayment)"
                                   style="text-align: center !important;"/>
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item.hk=='1'"
                                   type="text"
                                   v-model="item.repaymentDate2" placeholder="选择日期"
                                   @focus="showDatePicker($event,item,'repaymentDate')"
                                   style="text-align: center !important;    padding-left: 0 !important;text-indent: 0px;"/>
                            <span v-else>{{item.repaymentDate2}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">


                            <textarea v-if="item.isCheck&&item.hk=='1'" v-model="item.remark2"
                                      class="divMore"></textarea>
                            <span v-else>{{item.remark2}}</span>
                        </td>
                        <td style="vertical-align: bottom">
                            <template v-if="item.hk=='1'">
                                <input type="button" value="保存" class="btn oaBtn btn-sm" v-if="item.isCheck"
                                       @click="save(item.qkRepayment,item.yqRepayment)" style="margin-top: -6px;">
                                <input type="button" value="保存" class="btn oaBtn btn-sm"
                                       style="background: #ddd !important;cursor: no-drop;margin-top: -6px" v-else>
                            </template>
                            <template v-else>
                                <span></span>
                            </template>
                        </td>
                    </tr>
                    <tr v-for="(item2,i2) in item.repaymentParentList" class="benYwJieQ">
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2)?'bH':''">
                            <span class="lineOne">{{item2.actualRepaymentDate}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2)?'bH':''">
                            <template v-if="item2.hkType!='3'">
                                <span v-if="item.repaymentAmount=='0.00'&&compareDate(item.repaymentDate,getNowDate())"
                                      style="">未到期</span>

                                <span v-else>{{fmoney(item2.repaymentAmount)}}</span>
                            </template>
                            <template v-else>
                                <span>-</span>
                            </template>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2,'qianKuan')?'bH':''">
                            <span>{{fmoney(item2.everyRemainingArrear)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input type="text"
                                   v-if="((item.isCheck&&item.sumqkmoney!=0)||(item.isCheck&&item.repaymentAmount=='0.00'))&&item2.hk=='1'"
                                   @blur="strFormat($event.target,'contract.repayFQMent.'+i+'.qkRepayment'),repayMentMoney('repayFQMent',i,'0'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayFQMent.'+i+'.qkRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayFQMent.'+i+'.qkRepayment'),strFormat($event.target,'contract.repayFQMent.'+i+'.qkRepayment')"
                                   v-onedate="fmoney(item.qkRepayment)"
                                   style="text-align: center !important;"/>
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item2,'faXi')?'bH':''">
                            <span>{{fmoney(item2.everyOverduePenalty)}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item,'faXi')?'bH':''">
                            <span class="lineOne" style="padding-left: 0px !important;" v-if="item2.hkType=='3'">{{fmoney(item2.repaymentAmount)}}</span>
                            <span v-else>-</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item.sumyqmoney!=0&&item2.hk=='1'"
                                   type="text"
                                   @blur="strFormat($event.target,'contract.repayFQMent.'+i+'.yqRepayment'),repayMentMoney('repayFQMent',i,'1'),showWait()"
                                   @focus="strFormatF($event.target,'contract.repayFQMent.'+i+'.yqRepayment')"
                                   @click.once="strFormatF($event.target,'contract.repayFQMent.'+i+'.yqRepayment'),strFormat($event.target,'contract.repayFQMent.'+i+'.yqRepayment')"
                                   v-onedate="fmoney(item.yqRepayment)"
                                   style="text-align: center !important;"/>
                            <span v-else></span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;">
                            <input v-if="item.isCheck&&item2.hk=='1'"
                                   type="text"
                                   v-model="item.repaymentDate2" placeholder="选择日期"
                                   @focus="showDatePicker($event,item,'repaymentDate')"
                                   style="text-align: center !important;    padding-left: 0 !important;text-indent: 0px;"/>
                            <span v-else>{{item.repaymentDate2}}</span>
                        </td>
                        <td class="td-tanZongStyle-line" style="text-align: center !important;"
                            :class="showToday(item)?'bH':''">


                            <textarea v-if="item.isCheck&&item2.hk=='1'" v-model="item.remark2"
                                      class="divMore"></textarea>
                            <span v-else>{{item.remark2}}</span>
                        </td>
                        <td style="vertical-align: bottom">
                            <template v-if="item2.hk=='1'">
                                <input type="button" value="保存" class="btn oaBtn btn-sm" v-if="item.isCheck"
                                       @click="save(item.qkRepayment,item.yqRepayment)" style="margin-top: -6px;">
                                <input type="button" value="保存" class="btn oaBtn btn-sm"
                                       style="background: #ddd !important;cursor: no-drop;margin-top: -6px" v-else>
                            </template>
                            <template v-else>
                                <span></span>
                            </template>
                        </td>
                    </tr>
                </template>
                <template v-if="!contract.repayFQMent||contract.repayFQMent.length<=0">
                    <tr>
                        <td colspan="14">当前没有欠款</td>
                    </tr>
                </template>
            </table>
        </template>
        <div class="south no-print" style="height:50px;line-height:50px;text-align:center;">
            <input type="button" style="margin-left:20px;" value="返回" class="btn oaBtn btn-sm" @click="goBack">
            <!--<input type="button" style="margin-left:20px;" value="保存" class="btn oaBtn btn-sm" @click="save()">-->
        </div>
    </div>
</section>
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=7e54a132"></script>
<!--oa自定义  JS-->
<script src="/dist/js/oa.js?t=63aed32f"></script>
<script src="/page/apply/contract/Template.js?t=42e28def"></script>
<script src="https://file.ggxqce.com/web/vue.min.js"></script>
<script type="text/javascript" src="/dist/plugins/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<script src="/dist/plugins/webuploader-0.1.5/webuploader.min.js"></script>
<script>
    $(function () {
        $("body").on("click", ".lineOne", function (e) {
            if ($(".div-td-content-more").is(":hidden")) {

                var text = $(this).text();
                if (text != "") {
                    text = "<i></i>" + text;
                    $(".div-td-content-more").html(text).css({
                        "width": $(this).outerWidth() + 20 + "px",
                        "left": $(this).offset().left,
                        "top": ($(this).offset().top + $(this).outerHeight()) + "px"
                    }).show();
                    e.stopPropagation();
                }
            } else {
                $(".div-td-content-more").hide();
            }
        });
        $("body").on("click", ".div-td-content-more", function (e) {
            e.stopPropagation();
        });
        $("body").on("click", function () {
            $(".div-td-content-more").hide();
        });
    });
    $(function () {
        $("body").on("click", ".divMore", function (e) {
            if ($(".div-td-content-more").is(":hidden")) {

                var text = $(this).val();
                if (text != "") {
                    text = "<i></i>" + text;
                    $(".div-td-content-more").html(text).css({
                        "width": $(this).outerWidth() + "px",
                        "left": $(this).offset().left,
                        "top": ($(this).offset().top + $(this).outerHeight()) + "px"
                    }).show();
                    e.stopPropagation();
                }
            } else {
                $(".div-td-content-more").hide();
            }
        });
        $("body").on("click", ".div-td-content-more", function (e) {
            e.stopPropagation();
        });
        $("body").on("click", function () {
            $(".div-td-content-more").hide();
        });
    });
</script>
<script>
    // 注册一个局自定义指令 `v-inputOnce`
    Vue.directive('onedate', {
        // 当被绑定的元素插入到 DOM 中时……
        inserted: function (el) {
            // if($(el).hasClass("otherInput")){
            el.click()
            // }else{
            //     el.focus()
            //     el.blur()
            // }
            //聚焦元素

        },
        componentUpdated: function (el, binding) {
            // 聚焦元素


        }
    })
</script>
<script type="text/javascript">
    function refresh() {
        $.wyui.page.getByPage();
    }

    var api = frameElement.api;
    var app = new Vue({
        el: '#app',
        data: {
            clickItem: '',
            repayMoney: $.wyui.page.urlParams.repayMoney,
            repayDate: $.wyui.page.urlParams.repayDate,
            bond: $.wyui.page.urlParams.bond,
            createUserId: getCurrentUser().id,
            createUserName: getCurrentUser().name,
            canUseMoney: $.wyui.page.urlParams.canUseMoney,
            repayMoneyCanMoney: $.wyui.page.urlParams.canUseMoney,
            id: $.wyui.page.urlParams.id ? $.wyui.page.urlParams.id : '',
            buyType: $.wyui.page.urlParams.buyType,
            today: new Date().Format("yyyy-MM-dd"),//今天
            contract: {
                main: {city: "", customerCredit: ''},
                repayFQMent: [],
                repayRZMent: [
                    new Template.repayRZMentList('')
                ],
                repayRZDBMent: [
                    new Template.repayRZMentList('')
                ],
                repaySFMent: [
                    new Template.repaySFMentList('')
                ],
                repayDKMent: [],
                repayRZMentFn: [],
                repayRZMentFnDB: [],
            },
            repaymentTypeList: [
                {name: '客户自还', value: '客户自还'},
                {name: '公司垫款', value: '公司垫款'},
                {name: '保证金冲账', value: '保证金冲账'},
            ],
            saveContract: {
                main: {},
                repaymentFQList: [],
                repaymentRZList: [],
                repaymentDKList: [],
                repaymentSFList: [],
                repaymentRZDBList: [],
                financingRZList: [],
                financingRZDBList: []
            }

        },
        methods: {
            showWait: function () {
//                方案1
//                App.blockUI({
//                    target: '#wait',
//                    boxed: true,
//                    message: '加载中......'//,
//                    // animate: true
//                });
//                setTimeout(function(){  //使用  setTimeout（）方法设定定时2000毫秒
//
//                        App.unblockUI('#wait');
//                },300);
                $("#wait span").animate({opacity: 0}, 100).animate({opacity: 1}, 100)
                    .animate({opacity: 0}, 100).animate({opacity: 1}, 100)
            },
            inputChange: function (target) {
                this.canUseMoney = this.canUseMoney - Number(target.value)
            },
            noData: function (type, list1, list2) {
                var that = this;
                var isGo = false;
                for (var i = 0; i < list1.length; i++) {
                    if (type == "1") {
                        if ((list1[i].sumqkmoney || list1[i].sumyqmoney) && (that.compareFiveDate(list1[i].repaymentDate) <= 0)) {
                            isGo = true;
                        }
                    } else {
                        if ((list1[i].sumqkmoney || list1[i].sumyqmoney) && (that.compareFiveDate(list1[i].financingDate) <= 0)) {
                            isGo = true;
                        }
                    }

                }
                if (list2) {
                    for (var i = 0; i < list2.length; i++) {
                        if ((list2[i].sumqkmoney || list2[i].sumyqmoney) && (that.compareFiveDate(list2[i].repaymentDate) <= 0)) {
                            isGo = true;
                        }
                    }
                }
                return isGo;


            },
            showToday: function (item, str) {
                // return false;
                var dateTime = new Date().Format("yyyy-MM-dd");
                if (dateTime == item.createTime) {
                    if (str && str == "faXi") {
                        if (item.hkType == '2' || item.hkType == '3') {
                            return true
                        } else {
                            return false;
                        }
                    } else if (str && str == "qianKuan") {
                        if (item.hkType == '1') {
                            return true
                        } else {
                            return false;
                        }
                    } else {
                        return true
                    }
                }
            },
            showToday2: function (item) {
                var dateTime = new Date().Format("yyyy-MM-dd");
                var flag = false;
                if (dateTime == item.createTime) {
                    flag = true;
                    return flag;
                }
                if (item.repaymentParentList) {
                    for (var i = 0; i < item.repaymentParentList.length; i++) {
                        if (dateTime == item.repaymentParentList[i].createTime) {
                            flag = true;
                            return flag;
                        }
                    }
                }
            },
            remarks: function (item) {
                this.clickItem = item;
                var html = ""
                html = '<textarea style="width:95%;margin: 0 auto;outline: none;resize: none;" rows="10" cols="30" id="printText" class="printInput"></textarea><input class="btn oaBtn btn-sm printBtn" type="button" value="确认" style="margin-left: 35%;" onclick="app.pok()">';
                $.dialog({
                    content: html,
                    title: '请填写备注信息',
                    width: 350,
                    max: false,
                    min: false,
                    lock: true
                });
                console.log()
                $("#printText").text(item.remark2);
            },
            pok: function () {
                this.clickItem.remark2 = $("#printText").val()
                this.clickItem.repaymentAmount = this.clickItem.repaymentAmount + 1;
                this.clickItem.repaymentAmount = this.clickItem.repaymentAmount - 1;
                this.clickItem.advancesMoney = this.clickItem.advancesMoney + 1;
                this.clickItem.advancesMoney = this.clickItem.advancesMoney - 1;
                $(".ui_close").click();
            },

            download: function (attachId, fileName) {
                downloadFile(attachId,fileName)
                return false;
            },
            deleteFileRP: function (item, i, pid) {
                if (window.confirm("确定要删除该附件吗?")) {
                    if (pid || pid === 0) {
                        this.contract[item][pid].repaymentParentList[i].repaymentAttachName = "";
                        this.contract[item][pid].repaymentParentList[i].repaymentAttachUrl = "";
                        $("#" + item + "repaymentParentList" + pid + i).show();
                        //加这俩行为了刷新数据 无实际意义
                        // this.main[item].push(new Template['repaySFMentList']());
                        // this.main[item].splice(this.main[item].length - 1, 1);
                    } else {
                        this.contract[item][i].repaymentAttachName = "";
                        this.contract[item][i].repaymentAttachUrl = "";
                        $("#" + item + i).show();
                    }
                }

            },
            init: function () {
                var that = this
                setTimeout(function () {
                    $(".fj").each(function () {
                        var demo = $(this);
                        var name = demo.attr("id");
                        var pid = demo.attr('pid');
                        var thisid = demo.attr("thisid")
                        var nameValue = name + "Name";
                        var uploader = WebUploader.create({
                            // 选完文件后，是否自动上传。
                            auto: true,
                            // swf文件路径
                            swf: "/statics/plugin/webuploader-0.1.5/Uploader.swf",
                            // 文件接收服务端。
                            server: server.fjIp + "/attach/uploadFile.json",
                            // 选择文件的按钮。可选。
                            // 内部根据当前运行是创建，可能是input元素，也可能是flash.
                            pick: '#' + demo.attr("id"),
                            duplicate: true
                        });
                        // 文件上传过程中创建进度条实时显示。
                        uploader.on('uploadProgress', function (file, percentage) {
                            var $li = $('#' + file.id),
                                $percent = $li.find('.progress span');
                            // 避免重复创建
                            if (!$percent.length) {
                                $percent = $('<p class="progress"><span></span></p>')
                                    .appendTo($li)
                                    .find('span');
                            }
                            $percent.css('width', percentage * 100 + '%');
                        });
                        uploader.on("uploadStart", function () {
                            $("#progress").show();
                        });
                        uploader.on("uploadComplete", function () {
                            $("#progress").hide();
                        });
                        // 文件上传成功，给item添加成功class, 用样式标记上传成功。
                        uploader.on('uploadSuccess', function (file, response) {
                            if (name.substring(0, name.length - 1) == 'repayDKMent') {
                                var i = name.substring(name.length - 1, name.length)
                                that.contract.repayDKMent[i].repaymentAttachName = response.name;
                                that.contract.repayDKMent[i].repaymentAttachUrl = response.url;
                                $("#" + "repayDKMent" + i).hide();
                            } else if (name.indexOf('repayDKMentrepaymentParentList') > -1) {
                                that.contract.repayDKMent[pid].repaymentParentList[thisid].repaymentAttachName = response.name;
                                that.contract.repayDKMent[pid].repaymentParentList[thisid].repaymentAttachUrl = response.url;
                                $("#" + name).hide();
                            }
                            else if (name.substring(0, name.length - 1) == 'repayFQMent') {
                                var i = name.substring(name.length - 1, name.length)
                                that.contract.repayFQMent[i].repaymentAttachName = response.name;
                                that.contract.repayFQMent[i].repaymentAttachUrl = response.url;
                                $("#" + "repayFQMent" + i).hide();
                            } else if (name.indexOf('repayFQMentrepaymentParentList') > -1) {
                                that.contract.repayFQMent[pid].repaymentParentList[thisid].repaymentAttachName = response.name;
                                that.contract.repayFQMent[pid].repaymentParentList[thisid].repaymentAttachUrl = response.url;
                                $("#" + name).hide();
                            } else if (name.substring(0, name.length - 1) == 'repayRZMent') {
                                var i = name.substring(name.length - 1, name.length)
                                that.contract.repayRZMent[i].repaymentAttachName = response.name;
                                that.contract.repayRZMent[i].repaymentAttachUrl = response.url;
                                $("#" + "repayRZMent" + i).hide();
                            } else if (name.indexOf('repayRZMentrepaymentParentList') > -1) {
                                that.contract.repayRZMent[pid].repaymentParentList[thisid].repaymentAttachName = response.name;
                                that.contract.repayRZMent[pid].repaymentParentList[thisid].repaymentAttachUrl = response.url;
                                $("#" + name).hide();
                            } else if (name.substring(0, name.length - 1) == 'repayRZDBMent') {
                                var i = name.substring(name.length - 1, name.length)
                                that.contract.repayRZDBMent[i].repaymentAttachName = response.name;
                                that.contract.repayRZDBMent[i].repaymentAttachUrl = response.url;
                                $("#" + "repayRZDBMent" + i).hide();
                            }
                            else if (name.indexOf('repayRZDBMentrepaymentParentList') > -1) {
                                that.contract.repayRZDBMent[pid].repaymentParentList[thisid].repaymentAttachName = response.name;
                                that.contract.repayRZDBMent[pid].repaymentParentList[thisid].repaymentAttachUrl = response.url;
                                $("#" + name).hide();
                            } else if (name.substring(0, name.length - 1) == 'repaySFMent') {
                                var i = name.substring(name.length - 1, name.length)
                                that.contract.repaySFMent[i].repaymentAttachName = response.name;
                                that.contract.repaySFMent[i].repaymentAttachUrl = response.url;
                                $("#" + "repaySFMent" + i).hide();
                            } else if (name.indexOf('repaySFMentrepaymentParentList') > -1) {
                                that.contract.repaySFMent[pid].repaymentParentList[thisid].repaymentAttachName = response.name;
                                that.contract.repaySFMent[pid].repaymentParentList[thisid].repaymentAttachUrl = response.url;
                                $("#" + name).hide();
                            } else if (name.substring(0, name.length - 1) == 'repayRZMentFn') {
                                var i = name.substring(name.length - 1, name.length)
                                that.contract.repayRZMentFn[i].repaymentAttachName = response.name;
                                that.contract.repayRZMentFn[i].repaymentAttachUrl = response.url;
                                $("#" + "repayRZMentFn" + i).hide();
                            }
                            else if (name.substring(0, name.length - 1) == 'repayRZMentFnDB') {
                                var i = name.substring(name.length - 1, name.length)
                                that.contract.repayRZMentFnDB[i].repaymentAttachName = response.name;
                                that.contract.repayRZMentFnDB[i].repaymentAttachUrl = response.url;
                                $("#" + "repayRZMentFnDB" + i).hide();
                            }
                        });
                        // 文件上传失败，显示上传出错。
                        uploader.on('uploadError', function (file) {
                            alert("上传失败！");
                        });
                    });
                    that.hide()
                }, 500);

            },
            hide: function () {
                var that = this;
                setTimeout(function () {
                    if (that.contract.repayDKMent) {
                        for (var i = 0; i < that.contract.repayDKMent.length; i++) {
                            if (that.contract.repayDKMent[i].repaymentAttachName != null && that.contract.repayDKMent[i].repaymentAttachName != "" && that.contract.repayDKMent[i].repaymentAttachName != undefined) {
                                $("#" + "repayDKMent" + i).hide();
                            }
                            if (that.contract.repayDKMent[i].repaymentParentList) {
                                for (var b = 0; b < that.contract.repayDKMent[i].repaymentParentList.length; b++) {
                                    if (that.contract.repayDKMent[i].repaymentParentList[b].repaymentAttachName != null && that.contract.repayDKMent[i].repaymentParentList[b].repaymentAttachName != "" && that.contract.repayDKMent[i].repaymentParentList[b].repaymentAttachName != undefined) {
                                        $("#" + "repayDKMentrepaymentParentList" + i + b).hide();
                                    }
                                }
                            }
                        }
                    }
                    if (that.contract.repayRZMentFn) {
                        for (var i = 0; i < that.contract.repayRZMentFn.length; i++) {
                            if (that.contract.repayRZMentFn[i].repaymentAttachName != null && that.contract.repayRZMentFn[i].repaymentAttachName != "" && that.contract.repayRZMentFn[i].repaymentAttachName != undefined) {
                                $("#" + "repayRZMentFn" + i).hide();
                            }
                            if (that.contract.repayRZMentFn[i].repaymentParentList) {
                                for (var b = 0; b < that.contract.repayRZMentFn[i].repaymentParentList.length; b++) {
                                    if (that.contract.repayRZMentFn[i].repaymentParentList[b].repaymentAttachName != null && that.contract.repayRZMentFn[i].repaymentParentList[b].repaymentAttachName != "" && that.contract.repayRZMentFn[i].repaymentParentList[b].repaymentAttachName != undefined) {
                                        $("#" + "repayRZMentFnrepaymentParentList" + i + b).hide();
                                    }
                                }
                            }
                        }
                    }
                    if (that.contract.repayRZMentFnDB) {
                        for (var i = 0; i < that.contract.repayRZMentFnDB.length; i++) {
                            if (that.contract.repayRZMentFnDB[i].repaymentAttachName != null && that.contract.repayRZMentFnDB[i].repaymentAttachName != "" && that.contract.repayRZMentFnDB[i].repaymentAttachName != undefined) {
                                $("#" + "repayRZMentFnDB" + i).hide();
                            }
                            if (that.contract.repayRZMentFnDB[i].repaymentParentList) {
                                for (var b = 0; b < that.contract.repayRZMentFnDB[i].repaymentParentList.length; b++) {
                                    if (that.contract.repayRZMentFnDB[i].repaymentParentList[b].repaymentAttachName != null && that.contract.repayRZMentFnDB[i].repaymentParentList[b].repaymentAttachName != "" && that.contract.repayRZMentFnDB[i].repaymentParentList[b].repaymentAttachName != undefined) {
                                        $("#" + "repayRZMentFnDBrepaymentParentList" + i + b).hide();
                                    }
                                }
                            }
                        }
                    }
                    if (that.contract.repayFQMent) {
                        for (var i = 0; i < that.contract.repayFQMent.length; i++) {
                            if (that.contract.repayFQMent[i].repaymentAttachName != null && that.contract.repayFQMent[i].repaymentAttachName != "" && that.contract.repayFQMent[i].repaymentAttachName != undefined) {
                                $("#" + "repayFQMent" + i).hide();
                            }
                            if (that.contract.repayFQMent[i].repaymentParentList) {
                                for (var b = 0; b < that.contract.repayFQMent[i].repaymentParentList.length; b++) {
                                    if (that.contract.repayFQMent[i].repaymentParentList[b].repaymentAttachName != null && that.contract.repayFQMent[i].repaymentParentList[b].repaymentAttachName != "" && that.contract.repayFQMent[i].repaymentParentList[b].repaymentAttachName != undefined) {
                                        $("#" + "repayFQMentrepaymentParentList" + i + b).hide();
                                    }
                                }
                            }

                        }
                    }
                    if (that.contract.repayRZMent) {
                        for (var i = 0; i < that.contract.repayRZMent.length; i++) {
                            if (that.contract.repayRZMent[i].repaymentAttachName != null && that.contract.repayRZMent[i].repaymentAttachName != "" && that.contract.repayRZMent[i].repaymentAttachName != undefined) {
                                $("#" + "repayRZMent" + i).hide();
                            }
                            if (that.contract.repayRZMent[i].repaymentParentList) {
                                for (var b = 0; b < that.contract.repayRZMent[i].repaymentParentList.length; b++) {
                                    if (that.contract.repayRZMent[i].repaymentParentList[b].repaymentAttachName != null && that.contract.repayRZMent[i].repaymentParentList[b].repaymentAttachName != "" && that.contract.repayRZMent[i].repaymentParentList[b].repaymentAttachName != undefined) {
                                        $("#" + "repayRZMentrepaymentParentList" + i + b).hide();
                                    }
                                }
                            }

                        }
                    }
                    if (that.contract.repayRZDBMent) {
                        for (var i = 0; i < that.contract.repayRZDBMent.length; i++) {
                            if (that.contract.repayRZDBMent[i].repaymentAttachName != null && that.contract.repayRZDBMent[i].repaymentAttachName != "" && that.contract.repayRZDBMent[i].repaymentAttachName != undefined) {
                                $("#" + "repayRZDBMent" + i).hide();
                            }
                            if (that.contract.repayRZDBMent[i].repaymentParentList) {
                                for (var b = 0; b < that.contract.repayRZDBMent[i].repaymentParentList.length; b++) {
                                    if (that.contract.repayRZDBMent[i].repaymentParentList[b].repaymentAttachName != null && that.contract.repayRZDBMent[i].repaymentParentList[b].repaymentAttachName != "" && that.contract.repayRZDBMent[i].repaymentParentList[b].repaymentAttachName != undefined) {
                                        $("#" + "repayRZDBMentrepaymentParentList" + i + b).hide();
                                    }
                                }
                            }

                        }
                    }
                    if (that.contract.repaySFMent) {
                        for (var i = 0; i < that.contract.repaySFMent.length; i++) {
                            if (that.contract.repaySFMent[i].repaymentAttachName != null && that.contract.repaySFMent[i].repaymentAttachName != "" && that.contract.repaySFMent[i].repaymentAttachName != undefined) {
                                $("#" + "repaySFMent" + i).hide();
                            }
                            if (that.contract.repaySFMent[i].repaymentParentList) {
                                for (var b = 0; b < that.contract.repaySFMent[i].repaymentParentList.length; b++) {
                                    if (that.contract.repaySFMent[i].repaymentParentList[b].repaymentAttachName != null && that.contract.repaySFMent[i].repaymentParentList[b].repaymentAttachName != "" && that.contract.repaySFMent[i].repaymentParentList[b].repaymentAttachName != undefined) {
                                        $("#" + "repaySFMentrepaymentParentList" + i + b).hide();
                                    }
                                }
                            }

                        }
                    }
                })
            },
            fmoney: function (s, n) {
                n = n > 0 && n <= 20 ? n : 2;
                s = parseFloat((s + "").replace(/[^\d\.-]/g, "")).toFixed(n) + "";
                var l = s.split(".")[0].split("").reverse(), r = s.split(".")[1],
                    t = "";
                for (i = 0; i < l.length; i++) {
                    t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
                }
                var str = t.split("").reverse().join("") + "." + r;
                if (str == 0.00) {
                    str = "-"
                }
                return str;
            },
            compareDate: function (date1, date2) {
                var oDate1 = new Date(date1);
                var oDate2 = new Date(date2);
                if (oDate1.getTime() > oDate2.getTime()) {
                    return true;
                } else {
                    return false;
                }
            },
            compareDateDE: function (date1, date2) {
                var oDate1 = new Date(date1);
                var oDate2 = new Date(date2);
                if (oDate1.getTime() >= oDate2.getTime()) {
                    return true;
                } else {
                    return false;
                }
            },
            getNowDate: function () {
                var now = new Date();
                var year = now.getFullYear();
                var month = (now.getMonth() + 1).toString();
                var day = (now.getDate()).toString();
                var hour = (now.getHours()).toString();
                var minute = (now.getMinutes()).toString();
                var second = (now.getSeconds()).toString();
                if (month.length == 1) {
                    month = "0" + month;
                }
                if (day.length == 1) {
                    day = "0" + day;
                }
                if (hour.length == 1) {
                    hour = "0" + hour;
                }
                if (minute.length == 1) {
                    minute = "0" + minute;
                }
                if (second.length == 1) {
                    second = "0" + second;
                }
                var dateTime = year + "-" + month + "-" + day;
                return dateTime;
            },

            changeRed: function (type, i) {
                var flag = true;
                var nowDate = this.getNowDate();
                if (this.contract.main.haveDsdf == '0' && (type == 'repayRZMent' || type == 'repayRZDBMent')) {
                    flag = true;
                    return flag;
                }
                if (!this.contract[type][i].actualRepaymentDate) {
                    console.log(type)
                    if (this.compareDate(nowDate, this.contract[type][i].repaymentDate)) {
                        flag = false;
                        return flag;
                    }
                } else {
                    if ((this.contract[type][i].remainingArrears != '0' || this.contract[type][i].overduePenalty != '0') && this.compareDate(nowDate, this.contract[type][i].repaymentDate)) {
                        if (this.contract[type][i].remainingArrears != '0' || this.contract[type][i].overduePenalty != '0') {
                            flag = false;
                            return flag;
                        }
                        if (this.compareDateDE(this.contract[type][i].actualRepaymentDate, this.contract[type][i].repaymentDate)) {
                            flag = false;
                            return flag;
                        }
                    }

                    if (this.contract[type][i].repaymentParentList) {
                        for (var j = 0; j < this.contract[type][i].repaymentParentList.length; j++) {
                            if (this.contract[type][i].repaymentParentList[j].remainingArrears != '0'
                                && this.compareDate(nowDate, this.contract[type][i].repaymentParentList[j].repaymentDate)) {
                                if (this.compareDateDE(this.contract[type][i].repaymentParentList[j].actualRepaymentDate, this.contract[type][i].repaymentParentList[j].repaymentDate)) {
                                    flag = false;
                                    return flag;
                                }
                            }
                        }
                    }

                }
                return flag;
            },
            changeRedFn: function (type, i) {
                var flag = true;
                var nowDate = this.getNowDate();
                if (!this.contract[type][i].advancesDate) {
                    if (this.compareDate(nowDate, this.contract[type][i].financingDate)) {
                        flag = false;
                        return flag;
                    }
                } else {
                    if ((this.contract[type][i].remainingArrears != '0' || this.contract[type][i].jroverduePenalty != '0') && this.compareDate(nowDate, this.contract[type][i].financingDate)) {
                        if (this.contract[type][i].remainingArrears != '0' || this.contract[type][i].jroverduePenalty != '0') {
                            flag = false;
                            return flag;
                        }
                        if (this.compareDateDE(this.contract[type][i].advancesDate, this.contract[type][i].financingDate)) {
                            flag = false;
                            return flag;
                        }
                    }
                }
                return flag;
            },
            fjStyle: function (fjName) {
                if (fjName) {
                    var type = fjName.substring(fjName.lastIndexOf('.') + 1);
                    return 'img fj-' + type
                }
                return 'img'
            },
            showDatePicker: function (e, item, type) {
                var that = this;
                WdatePicker({
                    onpicked: function (dp) {

                        item.repaymentDate2 = dp.cal.getNewDateStr();

                        return true;
                    }
                });
                $(e.target).blur();
            },
            strFormat: function (target, data) {
                //此结果为了展示数据
                var value = (target.value).trim();
                value = value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g, '');
                if (!value) {
                    value = 0
                }
                ;
                //此结果为data存入数据
                var dataList = data.split('.');

                if (dataList.length > 0) {
                    if (dataList.length == 1) {
                        this[dataList[0]] = value;
                    }
                    if (dataList.length == 2) {
                        this[dataList[0]][dataList[1]] = value;
                    }
                    if (dataList.length == 3) {
                        this[dataList[0]][dataList[1]][dataList[2]] = value;
                    }
                    if (dataList.length == 4) {
                        this[dataList[0]][dataList[1]][dataList[2]][dataList[3]] = value;
                    }
                    if (dataList.length == 5) {
                        this[dataList[0]][dataList[1]][dataList[2]][dataList[3]][dataList[4]] = value;
                    }
                    if (dataList.length == 6) {
                        this[dataList[0]][dataList[1]][dataList[2]][dataList[3]][dataList[4]][dataList[5]] = value;
                    }
                }
                target.value = this.fmoney(value);
                if (target.value == "0.00") {
                    target.value = '';
                }
                if (!$(target).parents("table").hasClass("sxtable")) {
                    // this.calMoney();
                }
            },
            goBack: function () {
                // var pageId = top.getActivePageId();
                // top.closeTabByPageId(pageId);
                api.close();
            },
            strFormatF: function (target, data) {
                var value = '';
                var dataList = data.split('.');

                if (dataList.length > 0) {
                    if (dataList.length == 1) {
                        value = this[dataList[0]]
                    }
                    if (dataList.length == 2) {
                        value = this[dataList[0]][dataList[1]]
                    }
                    if (dataList.length == 3) {
                        value = this[dataList[0]][dataList[1]][dataList[2]]
                    }
                    if (dataList.length == 4) {
                        value = this[dataList[0]][dataList[1]][dataList[2]][dataList[3]]
                    }
                    if (dataList.length == 5) {
                        value = this[dataList[0]][dataList[1]][dataList[2]][dataList[3]][dataList[4]]
                    }
                    if (dataList.length == 6) {
                        value = this[dataList[0]][dataList[1]][dataList[2]][dataList[3]][dataList[4]][dataList[5]]
                    }

                }
                if (!value || value == '0.00') {
                    value = '';
                }
                target.value = value;
                if (target.value == "0.00") {
                    target.value = '';
                }

            },
            checked: function (item) {
                var that = this;
                console.log(that.contract.repaySFMent)
                var isCheck = item.isCheck
                for (var i = 0; i < that.canUseMoney.length; i++) {
                    that.canUseMoney[i].isCheck = false;
                }
                for (var i = 0; i < that.contract.repayFQMent.length; i++) {
                    that.contract.repayFQMent[i].isCheck = false;
                }
                for (var i = 0; i < that.contract.repayDKMent.length; i++) {
                    that.contract.repayDKMent[i].isCheck = false;
                }
                for (var i = 0; i < that.contract.repayRZMent.length; i++) {
                    that.contract.repayRZMent[i].isCheck = false;
                }
                for (var i = 0; i < that.contract.repayRZDBMent.length; i++) {
                    that.contract.repayRZDBMent[i].isCheck = false;
                }
                for (var i = 0; i < that.contract.repaySFMent.length; i++) {
                    that.contract.repaySFMent[i].isCheck = false;
                }
                for (var i = 0; i < that.contract.repayRZMentFn.length; i++) {
                    that.contract.repayRZMentFn[i].isCheck = false;
                }
                for (var i = 0; i < that.contract.repayRZMentFnDB.length; i++) {
                    that.contract.repayRZMentFnDB[i].isCheck = false;
                }
                item.isCheck = !isCheck;
                item.repaymentAmount = item.repaymentAmount + 1;
                item.repaymentAmount = item.repaymentAmount - 1;
                item.advancesMoney = item.advancesMoney + 1;
                item.advancesMoney = item.advancesMoney - 1;
                console.log(item)
            },
            showModel: function (width, title) {
                $.alert({type: 'topAlert', width: width, title: title})
            },
            save: function (oneMoney, twoMoney) {
                console.log(oneMoney, twoMoney, this.canUseMoney)
                var that = this;
                that.saveContract.createUserId = that.createUserId;
                that.saveContract.createUserName = that.createUserName;
                that.saveContract.repayDate = that.repayDate;
                that.saveContract.canUseMoney = that.canUseMoney;
                that.saveContract.main = that.contract.main;

                that.saveContract.repaymentFQList = that.contract.repayFQMent;
                that.saveContract.repaymentDKList = that.contract.repayDKMent;
                that.saveContract.repaymentRZList = that.contract.repayRZMent;
                that.saveContract.repaymentRZDBList = that.contract.repayRZDBMent;
                that.saveContract.repaymentSFList = that.contract.repaySFMent;
                that.saveContract.financingRZList = that.contract.repayRZMentFn;
                that.saveContract.financingRZDBList = that.contract.repayRZMentFnDB;
//                $("#app").hide();
                $.wyui.postLoadMethod(urlConfig.receivable.saveAcountRepaymentListById, trimRN(that.saveContract), function (data) {
                    that.showModel(200, "保存成功");
//                    alert("保存成功");
                    var pageId = top.getActivePageId();
//                    top.refreshTabById('accountReceivable' + that.id);
                    // top.refreshTabByName("应收台账详情", "no");
//                    top.closeTabByPageId("yscd");

                    // top.closeTabByPageId(pageId);
                    // top.refreshTabById(pageId);
                    // location.reload();
                    top.refreshTabByName("应收台账", "no");
                    top.closeTabByPageId('accountReceivable' + that.id);
                    // setTimeout(function () {
                    //     top.addTabs({
                    //         id: 'accountReceivable' + that.id,
                    //         title: '应收台账详情页',
                    //         close: true,
                    //         noblockUI: true,
                    //         url: 'apply/accountReceivable/detail.html?id=' + that.id + '&buyType=' + that.buyType + '&pageType=edit' + '&repayDate=' + that.repayDate+'&scorll=true',
                    //     });
                    // }, 200)
                    if (Number(that.canUseMoney) <= 0) {
                        setTimeout(function () {
                            top.addTabs({
                                id: 'accountReceivable' + that.id,
                                title: '应收台账详情页',
                                close: true,
                                noblockUI: true,
                                url: 'apply/accountReceivable/detail.html?id=' + that.id + '&buyType=' + that.buyType + '&pageType=edit' + '&repayDate=' + that.repayDate + '&scorll=true&&editUser=1',
                            });
                            api.close();
                        }, 200)
                    } else {
                        setTimeout(function () {
                            top.addTabs({
                                id: 'accountReceivable' + that.id,
                                title: '应收台账详情页',
                                close: true,
                                noblockUI: true,
                                url: 'apply/accountReceivable/detail.html?id=' + that.id + '&buyType=' + that.buyType + '&pageType=edit' + '&repayDate=' + that.repayDate + '&scorll=true&&editUser=1',
                            });
                            location.href = '/page/apply/accountReceivable/oneClick.html?id=' + that.id + '&repayMoney=0&buyType=' + that.buyType + '&repayDate=' + that.repayDate + '&canUseMoney=' + that.canUseMoney
                        }, 200)
                    }
                },false,true);
            },

            compareFiveDate: function (ydDate) {
                var aDate = new Date(this.getNowDate()); // 通过日期字符串，初始化第一个日期对象
                var bDate = new Date(ydDate); // 同上，初始化第二个日期对象
                var aDay = 24 * 60 * 60 * 1000; // 完整一天有24小时，将小时换算成毫秒时间戳
                var diffDay = (bDate - aDate) / aDay; // 计算间隔天数（注意日期隐式转换）
                // console.log(diffDay); // 2，23日-25日间隔2天
                return diffDay;
            },
            repayMentMoney: function (type, j, moudle) {
                console.log(type, j, moudle)
                var that = this;
                var qk = 0.00;

                if (that.contract.repayFQMent.length > 0) {
                    for (var i = 0; i < that.contract.repayFQMent.length; i++) {
                        qk = Number(that.contract.repayFQMent[i].yqRepayment) + Number(qk);
                        qk = Number(that.contract.repayFQMent[i].qkRepayment) + Number(qk);
                    }
                }
                if (that.contract.repayDKMent.length > 0) {
                    for (var i = 0; i < that.contract.repayDKMent.length; i++) {
                        qk = Number(that.contract.repayDKMent[i].yqRepayment) + Number(qk);
                        qk = Number(that.contract.repayDKMent[i].qkRepayment) + Number(qk);
                    }
                }
                if (that.contract.repayRZMent.length > 0) {
                    for (var i = 0; i < that.contract.repayRZMent.length; i++) {
                        qk = Number(that.contract.repayRZMent[i].yqRepayment) + Number(qk);
                        qk = Number(that.contract.repayRZMent[i].qkRepayment) + Number(qk);
                    }
                }
                if (that.contract.repayRZDBMent.length > 0) {
                    for (var i = 0; i < that.contract.repayRZDBMent.length; i++) {
                        qk = Number(that.contract.repayRZDBMent[i].yqRepayment) + Number(qk);
                        qk = Number(that.contract.repayRZDBMent[i].qkRepayment) + Number(qk);
                    }
                }
                if (that.contract.repaySFMent.length > 0) {
                    for (var i = 0; i < that.contract.repaySFMent.length; i++) {
                        qk = Number(that.contract.repaySFMent[i].yqRepayment) + Number(qk);
                        qk = Number(that.contract.repaySFMent[i].qkRepayment) + Number(qk);

                    }
                }
//                if (that.contract.repayRZMentFnDB.length > 0) {
//                    for (var i = 0; i < that.contract.repayRZMentFnDB.length; i++) {
//                        qk = Number(that.contract.repayRZMentFnDB[i].yqRepayment) + Number(qk);
//                        qk = Number(that.contract.repayRZMentFnDB[i].qkRepayment) + Number(qk);
//                    }
//                }
//                if (that.contract.repayRZMentFn.length > 0) {
//                    for (var i = 0; i < that.contract.repayRZMentFn.length; i++) {
//                        qk = Number(that.contract.repayRZMentFn[i].yqRepayment) + Number(qk);
//                        qk = Number(that.contract.repayRZMentFn[i].qkRepayment) + Number(qk);
//
//                    }
//                }
                if (Number(that.repayMoneyCanMoney) - Number(qk) >= 0) {
                    that.canUseMoney = Number(that.repayMoneyCanMoney) - Number(qk)
                } else {
                    if (moudle == '0') {
                        that.contract[type][j].qkRepayment = 0.00
                        $("#" + type + "Input" + j).focus();
                    }
                    if (moudle == '1') {
                        that.contract[type][j].yqRepayment = 0.00
                        $("#" + type + "yqInput" + j).focus();
                    }
                    if (that.bond=='0'&&that.canUseMoney!=0){
                        alert("可用余额为" + that.canUseMoney);
                    }
                }
            },
            canUseMoneychange: function () {
                var that = this;

                if (that.repayMoney) {
                    that.repayMoneyCanMoney = Number(that.repayMoney) + Number(that.canUseMoney);
                    that.canUseMoney = Number(that.repayMoney) + Number(that.canUseMoney);
                } else {
                    that.canUseMoney = that.contract.main.accountBalance;
                    that.repayMoneyCanMoney = that.contract.main.accountBalance;
                }
                // $("#sxbody").hide()
                // setTimeout(function () {
                //     $("#sxbody").show()
                // }, 1000);
            },
            chageInput: function (type, i, moudle) {
                var that = this;
                if (that.canUseMoney > 0.00) {
                    if (moudle == '0') {
                        if (Number(that.canUseMoney) - Number(that.contract[type][i].sumqkmoney) >= 0) {
                            that.contract[type][i].qkRepayment = that.contract[type][i].sumqkmoney;
                        }
                        $("#" + type + "Input" + i).show();
                        $("#" + type + "Span" + i).hide();
                        $("#" + type + "Input" + i).focus();
                        $("#" + type + "Input" + i).blur();
                    } else {
                        if (Number(that.canUseMoney) >= Number(that.contract[type][i].sumyqmoney)) {
                            that.contract[type][i].yqRepayment = that.contract[type][i].sumyqmoney;
                        }

                        $("#" + type + "yqInput" + i).show();
                        $("#" + type + "yqSpan" + i).hide();
                        $("#" + type + "yqInput" + i).focus();
                        $("#" + type + "yqInput" + i).blur();
                    }

                } else {
                    alert("可用余额为" + that.canUseMoney);
                }

            },
        },
        mounted: function () {
            var that = this;
            that.repayDate = $.wyui.page.urlParams.repayDate;
            $.wyui.postMethod(urlConfig.receivable.getAcountRepaymentListById, {id: that.id}, function (data) {
                that.id = $.wyui.page.urlParams.id ? $.wyui.page.urlParams.id : '';
                that.buyType = $.wyui.page.urlParams.buyType;
                that.contract = data;

//                that.canUseMoney = that.contract.main.accountBalance;

                for (var i = 0; i < data.repaymentFQList.length; i++) {
                    data.repaymentFQList[i].isCheck = false;
                    data.repaymentFQList[i].remark2 = '';
                    data.repaymentFQList[i].repaymentDate2 = '';
                    if (data.repaymentFQList[i].repaymentParentList) {
                        if (data.repaymentFQList[i].repaymentParentList.length > 0) {
                            for (var j = 0; j < data.repaymentFQList[i].repaymentParentList.length; j++) {
                                if (j == (data.repaymentFQList[i].repaymentParentList.length - 1)) {
                                    data.repaymentFQList[i].repaymentParentList[j].hk = '1';
                                }
                            }
                        } else {
                            console.log(i)
                            data.repaymentFQList[i].hk = '1';
                        }
                    }
                }
                for (var i = 0; i < data.repaymentDKList.length; i++) {
                    data.repaymentDKList[i].isCheck = false;
                    data.repaymentDKList[i].remark2 = '';
                    data.repaymentDKList[i].repaymentDate2 = '';
                    if (data.repaymentDKList[i].repaymentParentList) {
                        if (data.repaymentDKList[i].repaymentParentList.length > 0) {
                            for (var j = 0; j < data.repaymentDKList[i].repaymentParentList.length; j++) {
                                if (j == (data.repaymentDKList[i].repaymentParentList.length - 1)) {
                                    data.repaymentDKList[i].repaymentParentList[j].hk = '1';
                                }
                            }
                        } else {
                            console.log(i)
                            data.repaymentDKList[i].hk = '1';
                        }
                    }
                }
                for (var i = 0; i < data.repaymentRZList.length; i++) {
                    data.repaymentRZList[i].isCheck = false;
                    data.repaymentRZList[i].remark2 = '';
                    data.repaymentRZList[i].repaymentDate2 = '';
                    if (data.repaymentRZList[i].repaymentParentList) {
                        if (data.repaymentRZList[i].repaymentParentList.length > 0) {
                            for (var j = 0; j < data.repaymentRZList[i].repaymentParentList.length; j++) {
                                if (j == (data.repaymentRZList[i].repaymentParentList.length - 1)) {
                                    data.repaymentRZList[i].repaymentParentList[j].hk = '1';
                                }
                            }
                        } else {
                            console.log(i)
                            data.repaymentRZList[i].hk = '1';
                        }
                    }
                }
                for (var i = 0; i < data.repaymentRZDBList.length; i++) {
                    data.repaymentRZDBList[i].isCheck = false;
                    data.repaymentRZDBList[i].remark2 = '';
                    data.repaymentRZDBList[i].repaymentDate2 = '';
                    if (data.repaymentRZDBList[i].repaymentParentList) {
                        if (data.repaymentRZDBList[i].repaymentParentList.length > 0) {
                            for (var j = 0; j < data.repaymentRZDBList[i].repaymentParentList.length; j++) {
                                if (j == (data.repaymentRZDBList[i].repaymentParentList.length - 1)) {
                                    data.repaymentRZDBList[i].repaymentParentList[j].hk = '1';
                                }
                            }
                        } else {
                            console.log(i)
                            data.repaymentRZDBList[i].hk = '1';
                        }
                    }
                }
                for (var i = 0; i < data.repaymentSFList.length; i++) {
                    data.repaymentSFList[i].isCheck = false;
                    data.repaymentSFList[i].remark2 = '';
                    data.repaymentSFList[i].repaymentDate2 = '';
                    if (data.repaymentSFList[i].repaymentParentList) {
                        if (data.repaymentSFList[i].repaymentParentList.length > 0) {
                            for (var j = 0; j < data.repaymentSFList[i].repaymentParentList.length; j++) {
                                if (j == (data.repaymentSFList[i].repaymentParentList.length - 1)) {
                                    data.repaymentSFList[i].repaymentParentList[j].hk = '1';
                                }
                            }
                        } else {
                            console.log(i)
                            data.repaymentSFList[i].hk = '1';
                        }
                    }
                }
                for (var i = 0; i < data.financingRZList.length; i++) {
                    data.financingRZList[i].isCheck = false;
                    data.financingRZList[i].remark2 = '';
                    data.financingRZList[i].repaymentDate2 = '';
                    if (data.financingRZList[i].repaymentParentList) {
                        if (data.financingRZList[i].repaymentParentList.length > 0) {
                            for (var j = 0; j < data.financingRZList[i].repaymentParentList.length; j++) {
                                if (j == (data.financingRZList[i].repaymentParentList.length - 1)) {
                                    data.financingRZList[i].repaymentParentList[j].hk = '1';
                                }
                            }
                        } else {
                            console.log(i)
                            data.financingRZList[i].hk = '1';
                        }
                    }
                }
                for (var i = 0; i < data.financingRZDBList.length; i++) {
                    data.financingRZDBList[i].isCheck = false;
                    data.financingRZDBList[i].remark2 = '';
                    data.financingRZDBList[i].repaymentDate2 = '';
                    if (data.financingRZDBList[i].repaymentParentList) {
                        if (data.financingRZDBList[i].repaymentParentList.length > 0) {
                            for (var j = 0; j < data.financingRZDBList[i].repaymentParentList.length; j++) {
                                if (j == (data.financingRZDBList[i].repaymentParentList.length - 1)) {
                                    data.financingRZDBList[i].repaymentParentList[j].hk = '1';
                                }
                            }
                        } else {
                            console.log(i)
                            data.financingRZDBList[i].hk = '1';
                        }
                    }
                }

                that.contract.repayFQMent = data.repaymentFQList;

                that.contract.repayDKMent = data.repaymentDKList;

                that.contract.repayRZMent = data.repaymentRZList;

                that.contract.repayRZDBMent = data.repaymentRZDBList;

                that.contract.repaySFMent = data.repaymentSFList;

                that.contract.repayRZMentFn = data.financingRZList;

                that.contract.repayRZMentFnDB = data.financingRZDBList;
                console.log(that.contract.repaySFMent)
//                that.canUseMoneychange();
                that.init();
                that.hide();
            });
        }
    });
</script>
</body>
</html>